pub struct RouterIdentity { /* private fields */ }Expand description
Router identity.
Implementations§
Source§impl RouterIdentity
impl RouterIdentity
Sourcepub fn from_keys<R: Runtime>(
static_key: &StaticPrivateKey,
signing_key: &SigningPrivateKey,
) -> Result<Self>
pub fn from_keys<R: Runtime>( static_key: &StaticPrivateKey, signing_key: &SigningPrivateKey, ) -> Result<Self>
Create new RouterIdentity from keys.
Sourcepub fn parse_frame(
input: &[u8],
) -> IResult<&[u8], RouterIdentity, RouterIdentityParseError>
pub fn parse_frame( input: &[u8], ) -> IResult<&[u8], RouterIdentity, RouterIdentityParseError>
Parse RouterIdentity from input, returning rest of input and parsed router identity.
Sourcepub fn parse(bytes: impl AsRef<[u8]>) -> Result<Self, RouterIdentityParseError>
pub fn parse(bytes: impl AsRef<[u8]>) -> Result<Self, RouterIdentityParseError>
Try to parse router information from bytes.
Sourcepub fn serialize(&self) -> BytesMut
pub fn serialize(&self) -> BytesMut
Serialize RouterIdentity into a byte vector.
Sourcepub fn static_key(&self) -> &StaticPublicKey
pub fn static_key(&self) -> &StaticPublicKey
Get reference to router’s static public key.
Sourcepub fn signing_key(&self) -> &SigningPublicKey
pub fn signing_key(&self) -> &SigningPublicKey
Get reference to router’s signing public key.
Sourcepub fn serialized_len(&self) -> usize
pub fn serialized_len(&self) -> usize
Get serialized length of RouterIdentity.
Trait Implementations§
Source§impl Clone for RouterIdentity
impl Clone for RouterIdentity
Source§fn clone(&self) -> RouterIdentity
fn clone(&self) -> RouterIdentity
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for RouterIdentity
impl RefUnwindSafe for RouterIdentity
impl Send for RouterIdentity
impl Sync for RouterIdentity
impl Unpin for RouterIdentity
impl UnwindSafe for RouterIdentity
Blanket Implementations§
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