pub struct PeekOption<'mem> { /* private fields */ }Expand description
Lets you read from an option (implements read-only option operations)
Implementations§
Source§impl<'mem> PeekOption<'mem>
impl<'mem> PeekOption<'mem>
Sourcepub fn vtable(self) -> &'static OptionVTable
pub fn vtable(self) -> &'static OptionVTable
Returns the option vtable
Methods from Deref<Target = PeekValue<'mem>>§
Sourcepub fn vtable(&self) -> &'static ValueVTable
pub fn vtable(&self) -> &'static ValueVTable
Returns the vtable
Sourcepub fn eq(&self, other: &PeekValue<'_>) -> Option<bool>
pub fn eq(&self, other: &PeekValue<'_>) -> Option<bool>
Returns true if this scalar is equal to the other scalar
§Returns
false if equality comparison is not supported for this scalar type
Sourcepub fn partial_cmp(&self, other: &PeekValue<'_>) -> Option<Ordering>
pub fn partial_cmp(&self, other: &PeekValue<'_>) -> Option<Ordering>
Compares this scalar with another and returns their ordering
§Returns
None if comparison is not supported for this scalar type
Sourcepub fn cmp(&self, other: &PeekValue<'_>) -> Option<Ordering>
pub fn cmp(&self, other: &PeekValue<'_>) -> Option<Ordering>
Compares this scalar with another and returns their ordering
§Returns
None if comparison is not supported for this scalar type
Sourcepub fn gt(&self, other: &PeekValue<'_>) -> bool
pub fn gt(&self, other: &PeekValue<'_>) -> bool
Returns true if this scalar is greater than the other scalar
§Returns
false if comparison is not supported for this scalar type
Sourcepub fn gte(&self, other: &PeekValue<'_>) -> bool
pub fn gte(&self, other: &PeekValue<'_>) -> bool
Returns true if this scalar is greater than or equal to the other scalar
§Returns
false if comparison is not supported for this scalar type
Sourcepub fn lt(&self, other: &PeekValue<'_>) -> bool
pub fn lt(&self, other: &PeekValue<'_>) -> bool
Returns true if this scalar is less than the other scalar
§Returns
false if comparison is not supported for this scalar type
Sourcepub fn lte(&self, other: &PeekValue<'_>) -> bool
pub fn lte(&self, other: &PeekValue<'_>) -> bool
Returns true if this scalar is less than or equal to the other scalar
§Returns
false if comparison is not supported for this scalar type
Sourcepub fn display(&self, f: &mut Formatter<'_>) -> Option<Result>
pub fn display(&self, f: &mut Formatter<'_>) -> Option<Result>
Formats this scalar for display
§Returns
None if display formatting is not supported for this scalar type
Sourcepub fn debug(&self, f: &mut Formatter<'_>) -> Option<Result>
pub fn debug(&self, f: &mut Formatter<'_>) -> Option<Result>
Formats this scalar for debug
§Returns
None if debug formatting is not supported for this scalar type
Sourcepub fn type_name(&self, f: &mut Formatter<'_>, opts: TypeNameOpts) -> Result
pub fn type_name(&self, f: &mut Formatter<'_>, opts: TypeNameOpts) -> Result
Sourcepub fn data(&self) -> OpaqueConst<'mem>
pub fn data(&self) -> OpaqueConst<'mem>
Returns the data
Sourcepub fn scalar_type(&self) -> Option<ScalarType>
pub fn scalar_type(&self) -> Option<ScalarType>
Get the scalar type if set.
Trait Implementations§
Source§impl<'mem> Clone for PeekOption<'mem>
impl<'mem> Clone for PeekOption<'mem>
Source§fn clone(&self) -> PeekOption<'mem>
fn clone(&self) -> PeekOption<'mem>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more