pub struct ScalarValueRef<'a> { /* private fields */ }Expand description
Borrowed view over a scalar value backed by DynCellRef.
Implementations§
Source§impl<'a> ScalarValueRef<'a>
impl<'a> ScalarValueRef<'a>
Sourcepub fn compare(&self, other: &ScalarValueRef<'_>) -> Option<Ordering>
pub fn compare(&self, other: &ScalarValueRef<'_>) -> Option<Ordering>
Compares this scalar with another, returning the ordering when both sides are comparable.
Sourcepub fn as_int_i128(&self) -> Option<i128>
pub fn as_int_i128(&self) -> Option<i128>
Extract as signed integer across supported widths.
Sourcepub fn as_uint_u128(&self) -> Option<u128>
pub fn as_uint_u128(&self) -> Option<u128>
Extract as unsigned integer across supported widths.
Sourcepub fn as_dyn(&self) -> DynCellRef<'a>
pub fn as_dyn(&self) -> DynCellRef<'a>
Access the underlying dynamic cell reference.
Sourcepub fn from_dyn(cell: DynCellRef<'a>) -> Self
pub fn from_dyn(cell: DynCellRef<'a>) -> Self
Construct from a dynamic cell reference.
Trait Implementations§
Source§impl<'a> Clone for ScalarValueRef<'a>
impl<'a> Clone for ScalarValueRef<'a>
Source§fn clone(&self) -> ScalarValueRef<'a>
fn clone(&self) -> ScalarValueRef<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ScalarValueRef<'a>
impl<'a> Debug for ScalarValueRef<'a>
Source§impl<'a> PartialEq for ScalarValueRef<'a>
impl<'a> PartialEq for ScalarValueRef<'a>
Source§impl PartialEq<DynCellRef<'_>> for ScalarValueRef<'_>
impl PartialEq<DynCellRef<'_>> for ScalarValueRef<'_>
Source§fn eq(&self, other: &DynCellRef<'_>) -> bool
fn eq(&self, other: &DynCellRef<'_>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ScalarValueRef<'_>
impl PartialOrd for ScalarValueRef<'_>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ScalarValueRef<'a>
impl<'a> !UnwindSafe for ScalarValueRef<'a>
impl<'a> Freeze for ScalarValueRef<'a>
impl<'a> Send for ScalarValueRef<'a>
impl<'a> Sync for ScalarValueRef<'a>
impl<'a> Unpin for ScalarValueRef<'a>
impl<'a> UnsafeUnpin for ScalarValueRef<'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