[][src]Struct koibumi_core::content::Msg

pub struct Msg { /* fields omitted */ }

A content of a msg message.

Implementations

impl Msg[src]

pub fn new(
    header: impl AsRef<[u8]>,
    identity: &PrivateIdentity,
    to_identity: &PublicIdentity,
    encoding: Encoding,
    message: Vec<u8>
) -> Result<Self, MsgError>
[src]

Construct a msg content and sign it.

pub fn stream_number(&self) -> Stream[src]

Returns the stream number.

pub fn encoding(&self) -> Encoding[src]

Returns the encoding.

pub fn message(&self) -> &[u8][src]

Returns the message.

pub fn verify(&self, signed_header: impl AsRef<[u8]>) -> Result<(), VerifyError>[src]

Verify the signature.

pub fn address(&self) -> Result<Address, AddressError>[src]

Returns the Bitmessage address.

Trait Implementations

impl Clone for Msg[src]

impl Debug for Msg[src]

impl Eq for Msg[src]

impl Hash for Msg[src]

impl PartialEq<Msg> for Msg[src]

impl ReadFrom for Msg[src]

impl StructuralEq for Msg[src]

impl StructuralPartialEq for Msg[src]

impl WriteTo for Msg[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ReadFromExact for T where
    T: ReadFrom
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.