Struct soroban_sdk::Symbol
[−]pub struct Symbol(_);Expand description
Symbol reprents strings up to 10 characters long with a a-zA-Z0-9_
alphabet encoded into a 60-bit space between 10 characters long.
Wrapper for a RawVal that is tagged with [Tag::Symbol], interpreting the
RawVal’s body as a 60-bit small “string-like” object, 10 characters or
less and with characters drawn from the 64-character repertoire
a-zA-Z0-9_.
Implementations
impl Symbol
impl Symbol
Trait Implementations
impl FromIterator<char> for Symbol
impl FromIterator<char> for Symbol
fn from_iter<T>(iter: T) -> Symbol where
T: IntoIterator<Item = char>,
fn from_iter<T>(iter: T) -> Symbol where
T: IntoIterator<Item = char>,
Creates a value from an iterator. Read more
impl IntoIterator for Symbol
impl IntoIterator for Symbol
impl Ord for Symbol
impl Ord for Symbol
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
impl PartialOrd<Symbol> for Symbol
impl PartialOrd<Symbol> for Symbol
fn partial_cmp(&self, other: &Symbol) -> Option<Ordering>
fn partial_cmp(&self, other: &Symbol) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl RawValConvertible for Symbol
impl RawValConvertible for Symbol
fn is_val_type(v: RawVal) -> bool
fn is_val_type(v: RawVal) -> bool
Returns true if v is in a union state compatible with Self.
unsafe fn unchecked_from_val(v: RawVal) -> Symbol
unsafe fn unchecked_from_val(v: RawVal) -> Symbol
Converts the bits making up a RawVal into Self without checking
that the RawVal is tagged correctly, assuming that such a check has
been performed elsewhere. It is the caller’s responsibility to arrange
that such checks have occurred before calling unchecked_from_val,
which is why it is marked as unsafe (it does not represent a risk of
memory-unsafety, merely “serious logic errors”). Read more
fn try_convert(v: RawVal) -> Option<Self>
fn try_convert(v: RawVal) -> Option<Self>
Attempt a conversion from RawVal to Self, returning None if the
provided RawVal is not tagged correctly. By default this calls
Self::is_val_type and Self::unchecked_from_val, but it can be
customized on a type-by-type basis to avoid redundant tag tests and
produce more efficient code, as it is done for Static values like
bool. Read more
impl Copy for Symbol
impl Eq for Symbol
impl Val for Symbol
Auto Trait Implementations
impl RefUnwindSafe for Symbol
impl Send for Symbol
impl Sync for Symbol
impl Unpin for Symbol
impl UnwindSafe for Symbol
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more