Struct capnp::message::Reader [−][src]
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]
impl<S> Reader<S> where
S: ReaderSegments,
pub fn new(segments: S, options: ReaderOptions) -> Self
[src]
pub fn new(segments: S, options: ReaderOptions) -> Self
pub fn get_root<'a, T: FromPointerReader<'a>>(&'a self) -> Result<T>
[src]
pub fn get_root<'a, T: FromPointerReader<'a>>(&'a self) -> Result<T>
Gets the root of the message, interpreting it as the given type.
pub fn into_segments(self) -> S
[src]
pub fn into_segments(self) -> S
pub fn is_canonical(&self) -> Result<bool>
[src]
pub fn is_canonical(&self) -> Result<bool>
Checks whether the message is canonical.
pub fn canonicalize(&self) -> Result<Vec<Word>>
[src]
pub fn canonicalize(&self) -> Result<Vec<Word>>
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]
pub fn into_typed<T: for<'a> Owned<'a>>(self) -> TypedReader<S, T>
Trait Implementations
impl<S, T> From<Reader<S>> for TypedReader<S, T> where
S: ReaderSegments,
T: for<'a> Owned<'a>,
[src]
impl<S, T> From<Reader<S>> for TypedReader<S, T> where
S: ReaderSegments,
T: for<'a> Owned<'a>,
fn from(message: Reader<S>) -> TypedReader<S, T>
[src]
fn from(message: Reader<S>) -> TypedReader<S, T>
Performs the conversion.