Enum soroban_env_guest::xdr::ScVal
pub enum ScVal {
U63(i64),
U32(u32),
I32(i32),
Static(ScStatic),
Object(Option<ScObject>),
Symbol(StringM<10>),
Bitset(u64),
Status(ScStatus),
}
Variants
U63(i64)
U32(u32)
I32(i32)
Static(ScStatic)
Object(Option<ScObject>)
Symbol(StringM<10>)
Bitset(u64)
Status(ScStatus)
Implementations
impl ScVal
impl ScVal
pub const VARIANTS: [ScValType; 8] = [ScValType::U63, ScValType::U32, ScValType::I32, ScValType::Static, ScValType::Object, ScValType::Symbol, ScValType::Bitset, ScValType::Status]
pub const VARIANTS_STR: [&'static str; 8] = ["U63", "U32", "I32", "Static", "Object", "Symbol", "Bitset", "Status"]
pub const fn name(&self) -> &'static str
pub const fn discriminant(&self) -> ScValType
pub const fn variants() -> [ScValType; 8]
Trait Implementations
impl Discriminant<ScValType> for ScVal
impl Discriminant<ScValType> for ScVal
fn discriminant(&self) -> ScValType
impl Ord for ScVal
impl Ord for ScVal
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
impl PartialOrd<ScVal> for ScVal
impl PartialOrd<ScVal> for ScVal
sourceimpl<'a, E> TryIntoVal<E, Object> for &'a ScValwhere
E: Env + TryConvert<&'a ScObject, Object>,
impl<'a, E> TryIntoVal<E, Object> for &'a ScValwhere
E: Env + TryConvert<&'a ScObject, Object>,
type Error = <E as TryConvert<&'a ScObject, Object>>::Error
fn try_into_val(
self,
env: &E
) -> Result<Object, <&'a ScVal as TryIntoVal<E, Object>>::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
sourceimpl<E> TryIntoVal<E, Object> for ScValwhere
E: Env + TryConvert<ScObject, Object>,
impl<E> TryIntoVal<E, Object> for ScValwhere
E: Env + TryConvert<ScObject, Object>,
type Error = <E as TryConvert<ScObject, Object>>::Error
fn try_into_val(
self,
env: &E
) -> Result<Object, <ScVal as TryIntoVal<E, Object>>::Error>
fn try_into_env_val(self, env: &E) -> Result<EnvVal<E, V>, Self::Error>
impl Eq for ScVal
impl ReadXdr for ScVal
impl StructuralEq for ScVal
impl StructuralPartialEq for ScVal
impl Union<ScValType> for ScVal
impl WriteXdr for ScVal
Auto Trait Implementations
impl RefUnwindSafe for ScVal
impl Send for ScVal
impl Sync for ScVal
impl Unpin for ScVal
impl UnwindSafe for ScVal
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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