[−][src]Struct cjdns_ann::AnnouncementPacket
Serialized announcement message. A thin wrapper over announcement packet bytes.
Implementations
impl AnnouncementPacket
[src]
pub fn try_new(ann_data: Vec<u8>) -> Result<Self, PacketError>
[src]
Wrap raw announcement message bytes.
Results in error if ann_data
packet length is less than 120 bytes (incomplete message header).
Note
It is valid for announcement to have just header with no data.
pub fn check(&self) -> Result<(), PacketError>
[src]
Checks announcement message digital signature validity. Gets signature, public signing key and signed data bytes from announcement packet and performs signature check using crypto_sign_verify_detached.
pub fn parse(self) -> Result<Announcement, PacketError>
[src]
Parses announcement packet and creates deserialized announcement message, consuming this packet.
pub fn into_inner(self) -> Vec<u8>
[src]
Trait Implementations
impl Clone for AnnouncementPacket
[src]
fn clone(&self) -> AnnouncementPacket
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for AnnouncementPacket
[src]
impl Eq for AnnouncementPacket
[src]
impl PartialEq<AnnouncementPacket> for AnnouncementPacket
[src]
fn eq(&self, other: &AnnouncementPacket) -> bool
[src]
fn ne(&self, other: &AnnouncementPacket) -> bool
[src]
impl StructuralEq for AnnouncementPacket
[src]
impl StructuralPartialEq for AnnouncementPacket
[src]
Auto Trait Implementations
impl RefUnwindSafe for AnnouncementPacket
impl Send for AnnouncementPacket
impl Sync for AnnouncementPacket
impl Unpin for AnnouncementPacket
impl UnwindSafe for AnnouncementPacket
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,