pub struct GetOptions<'a> {
pub path: VariantPath<'a>,
pub as_type: Option<Field>,
pub cast_options: CastOptions<'a>,
}
Expand description
Controls the action of the variant_get kernel.
Fields§
§path: VariantPath<'a>
What path to extract
as_type: Option<Field>
if as_type
is None, the returned array will itself be a VariantArray.
if as_type
is Some(type)
the field is returned as the specified type.
cast_options: CastOptions<'a>
Controls the casting behavior (e.g. error vs substituting null on cast error).
Implementations§
Source§impl<'a> GetOptions<'a>
impl<'a> GetOptions<'a>
Sourcepub fn new_with_path(path: VariantPath<'a>) -> Self
pub fn new_with_path(path: VariantPath<'a>) -> Self
Construct options to get the specified path as a variant.
Trait Implementations§
Source§impl<'a> Clone for GetOptions<'a>
impl<'a> Clone for GetOptions<'a>
Source§fn clone(&self) -> GetOptions<'a>
fn clone(&self) -> GetOptions<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for GetOptions<'a>
impl<'a> RefUnwindSafe for GetOptions<'a>
impl<'a> Send for GetOptions<'a>
impl<'a> Sync for GetOptions<'a>
impl<'a> Unpin for GetOptions<'a>
impl<'a> UnwindSafe for GetOptions<'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