pub struct Version {
pub v: VersionInt,
pub req: VersionReq,
}
Expand description
Represents the network version and protocol version used in karyon p2p.
§Example
use karyon_p2p::Version;
let version: Version = "0.2.0, >0.1.0".parse().unwrap();
let version: Version = "0.2.0".parse().unwrap();
Fields§
§v: VersionInt
§req: VersionReq
Implementations§
Source§impl Version
impl Version
Sourcepub fn new(v: VersionInt, req: VersionReq) -> Self
pub fn new(v: VersionInt, req: VersionReq) -> Self
Creates a new Version
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more