pub struct PeekMap<'mem> { /* private fields */ }Expand description
Lets you read from a map (implements read-only facet_core::MapVTable proxies)
Implementations§
Source§impl<'mem> PeekMap<'mem>
impl<'mem> PeekMap<'mem>
Sourcepub fn contains_key(&self, key: &impl Facet) -> bool
pub fn contains_key(&self, key: &impl Facet) -> bool
Check if the map contains a key
Sourcepub fn get<'k>(&self, key: &'k impl Facet) -> Option<Peek<'mem>>
pub fn get<'k>(&self, key: &'k impl Facet) -> Option<Peek<'mem>>
Get a value from the map for the given key
Sourcepub fn iter(self) -> PeekMapIter<'mem> ⓘ
pub fn iter(self) -> PeekMapIter<'mem> ⓘ
Returns an iterator over the key-value pairs in the map
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.