[−][src]Struct capnp::message::Reader
A container used to read a message.
Methods
impl<S> Reader<S> where
S: ReaderSegments,
[src]
S: ReaderSegments,
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]
S: ReaderSegments,
T: for<'a> Owned<'a>,
fn from(message: Reader<S>) -> TypedReader<S, T>
[src]
Auto Trait Implementations
impl<S> Send for Reader<S> where
S: Send,
S: Send,
impl<S> !Sync for Reader<S>
impl<S> Unpin for Reader<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for Reader<S> where
S: UnwindSafe,
S: UnwindSafe,
impl<S> !RefUnwindSafe for Reader<S>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,