#[non_exhaustive]pub enum Scalar {
Show 16 variants
String,
Bytes,
I8,
I16,
I32,
I64,
I128,
U8,
U16,
U32,
U64,
U128,
F32,
F64,
Boolean,
Nothing,
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
String
Bytes
I8
I16
I32
I64
I128
U8
U16
U32
U64
U128
F32
F64
Boolean
Nothing
An empty tuple, null, undefined, whatever you wish
Implementations§
Source§impl Scalar
impl Scalar
Sourcepub unsafe fn get_contents<'a>(&self, ptr: *const u8) -> ScalarContents<'a>
pub unsafe fn get_contents<'a>(&self, ptr: *const u8) -> ScalarContents<'a>
Get the contents of a scalar value from a memory location.
§Safety
This function is unsafe because it reads from raw memory. The caller must ensure that:
- The pointer points to a valid, initialized value of the correct type
- The memory is properly aligned for the type
- The memory is not mutated while the returned ScalarContents is in use
Trait Implementations§
impl Copy for Scalar
impl Eq for Scalar
impl StructuralPartialEq for Scalar
Auto Trait Implementations§
impl Freeze for Scalar
impl RefUnwindSafe for Scalar
impl Send for Scalar
impl Sync for Scalar
impl Unpin for Scalar
impl UnwindSafe for Scalar
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