pub struct Reader<'a> { /* private fields */ }Expand description
Reads values back off a caller’s tape, checking every field.
Implementations§
Source§impl<'a> Reader<'a>
impl<'a> Reader<'a>
Sourcepub fn new(nodes: &'a [OpenbimIfcValueNode], strings: &'a [u8]) -> Self
pub fn new(nodes: &'a [OpenbimIfcValueNode], strings: &'a [u8]) -> Self
Read from nodes, whose string ranges index into strings.
Sourcepub fn single(self) -> Result<Tagged, BindingError>
pub fn single(self) -> Result<Tagged, BindingError>
Decode exactly one value, then require the tape to be used up.
Sourcepub fn plain_single(self) -> Result<Plain, BindingError>
pub fn plain_single(self) -> Result<Plain, BindingError>
Decode exactly one plain value (#342), then require the tape to be used up.
null, bool, integer, real, text, ref and list nodes
are plain host values, coerced against the declared type; an
exact node’s child, and the kinds with no plain form (derived,
unknown, binary, enum, typed), are written as given.
Auto Trait Implementations§
impl<'a> Freeze for Reader<'a>
impl<'a> RefUnwindSafe for Reader<'a>
impl<'a> Send for Reader<'a>
impl<'a> Sync for Reader<'a>
impl<'a> Unpin for Reader<'a>
impl<'a> UnsafeUnpin for Reader<'a>
impl<'a> UnwindSafe for Reader<'a>
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