[][src]Struct capnp::message::Reader

pub struct Reader<S> where
    S: ReaderSegments
{ /* fields omitted */ }

A container used to read a message.

Methods

impl<S> Reader<S> where
    S: ReaderSegments
[src]

pub fn new(segments: S, options: ReaderOptions) -> Self[src]

pub fn get_root<'a, T: FromPointerReader<'a>>(&'a self) -> Result<T>[src]

Gets the root of the message, interpreting it as the given type.

pub fn into_segments(self) -> S[src]

pub fn is_canonical(&self) -> Result<bool>[src]

Checks whether the message is canonical.

pub fn canonicalize(&self) -> Result<Vec<Word>>[src]

Gets the canonical form of this message. Works by copying the message twice. For a canonicalization method that only requires one copy, see message::Builder::set_root_canonical().

pub fn into_typed<T: for<'a> Owned<'a>>(self) -> TypedReader<S, T>[src]

Trait Implementations

impl<S, T> From<Reader<S>> for TypedReader<S, T> where
    S: ReaderSegments,
    T: for<'a> Owned<'a>, 
[src]

Auto Trait Implementations

impl<S> !RefUnwindSafe for Reader<S>

impl<S> Send for Reader<S> where
    S: Send

impl<S> !Sync for Reader<S>

impl<S> Unpin for Reader<S> where
    S: Unpin

impl<S> UnwindSafe for Reader<S> where
    S: UnwindSafe

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, 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.