pub struct Tape<'input>(pub Vec<Node<'input>>);
Expand description
Tape
Tuple Fields§
§0: Vec<Node<'input>>
Implementations§
Source§impl<'input> Tape<'input>
impl<'input> Tape<'input>
Sourcepub fn as_value(&self) -> Value<'_, 'input>
pub fn as_value(&self) -> Value<'_, 'input>
Turns the tape into a Value
that can be used like a value_trait::Value
Sourcepub fn reset<'new>(self) -> Tape<'new>
pub fn reset<'new>(self) -> Tape<'new>
Clears the tape and returns it with a new lifetime to allow re-using the already allocated buffer.
Sourcepub fn deserialize<T>(self) -> Result<T>where
T: Deserialize<'input>,
pub fn deserialize<T>(self) -> Result<T>where
T: Deserialize<'input>,
Deserializes the tape into a type that implements serde::Deserialize
§Errors
Returns an error if the deserialization fails
Trait Implementations§
Auto Trait Implementations§
impl<'input> Freeze for Tape<'input>
impl<'input> RefUnwindSafe for Tape<'input>
impl<'input> Send for Tape<'input>
impl<'input> Sync for Tape<'input>
impl<'input> Unpin for Tape<'input>
impl<'input> UnwindSafe for Tape<'input>
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