[][src]Struct koibumi_core::object::Msg

pub struct Msg { /* fields omitted */ }

msg object.

Implementations

impl Msg[src]

pub fn new(encrypted: Vec<u8>) -> Self[src]

Creates a msg object from an encrypted content.

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

Returns the reference to the encrypted content of this msg object.

pub fn decrypt(
    &self,
    header: &Header,
    identity: &PrivateIdentity
) -> Result<Msg, DecryptError>
[src]

Decrypts this msg object and returns the decrypted content.

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 SizedReadFrom for Msg[src]

impl StructuralEq for Msg[src]

impl StructuralPartialEq for Msg[src]

impl TryFrom<Object> for Msg[src]

type Error = TryIntoMsgError

The type returned in the event of a conversion error.

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> Same<T> for T

type Output = T

Should always be Self

impl<T> SizedReadFromExact for T where
    T: SizedReadFrom
[src]

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.