pub struct Reader<S>where
S: ReaderSegments,{ /* private fields */ }
Expand description
A container used to read a message.
Implementations§
source§impl<S> Reader<S>where
S: ReaderSegments,
impl<S> Reader<S>where
S: ReaderSegments,
pub fn new(segments: S, options: ReaderOptions) -> Self
sourcepub fn get_root<'a, T: FromPointerReader<'a>>(&'a self) -> Result<T>
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
sourcepub fn is_canonical(&self) -> Result<bool>
pub fn is_canonical(&self) -> Result<bool>
Checks whether the message is canonical.
sourcepub fn canonicalize(&self) -> Result<Vec<Word>>
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: Owned>(self) -> TypedReader<S, T>
Trait Implementations§
Auto Trait Implementations§
impl<S> !Freeze for Reader<S>
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more