Struct ruby_marshal::FromValueContext
source · pub struct FromValueContext<'a> { /* private fields */ }
Expand description
A context to manage extracting values.
Implementations§
source§impl<'a> FromValueContext<'a>
impl<'a> FromValueContext<'a>
sourcepub fn new(arena: &'a ValueArena) -> Self
pub fn new(arena: &'a ValueArena) -> Self
Create a new context from an arena.
sourcepub fn from_value<T>(&self, handle: ValueHandle) -> Result<T, FromValueError>where
T: FromValue<'a>,
pub fn from_value<T>(&self, handle: ValueHandle) -> Result<T, FromValueError>where
T: FromValue<'a>,
Extract a type from a value.
sourcepub fn new_unexpected_value_kind_error(&self, kind: ValueKind) -> FromValueError
pub fn new_unexpected_value_kind_error(&self, kind: ValueKind) -> FromValueError
Create a new UnexpectedValueKind error
Auto Trait Implementations§
impl<'a> !Freeze for FromValueContext<'a>
impl<'a> !RefUnwindSafe for FromValueContext<'a>
impl<'a> Send for FromValueContext<'a>
impl<'a> !Sync for FromValueContext<'a>
impl<'a> Unpin for FromValueContext<'a>
impl<'a> UnwindSafe for FromValueContext<'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