Struct soroban_env_host::DurationSmall
source · pub struct DurationSmall(_);
Implementations§
Trait Implementations§
source§impl AsMut<RawVal> for DurationSmall
impl AsMut<RawVal> for DurationSmall
source§impl AsRef<RawVal> for DurationSmall
impl AsRef<RawVal> for DurationSmall
source§impl Clone for DurationSmall
impl Clone for DurationSmall
source§fn clone(&self) -> DurationSmall
fn clone(&self) -> DurationSmall
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DurationSmall
impl Debug for DurationSmall
source§impl From<&DurationSmall> for RawVal
impl From<&DurationSmall> for RawVal
source§fn from(b: &DurationSmall) -> RawVal
fn from(b: &DurationSmall) -> RawVal
Converts to this type from the input type.
source§impl From<DurationSmall> for DurationVal
impl From<DurationSmall> for DurationVal
source§fn from(s: DurationSmall) -> DurationVal
fn from(s: DurationSmall) -> DurationVal
Converts to this type from the input type.
source§impl From<DurationSmall> for RawVal
impl From<DurationSmall> for RawVal
source§fn from(b: DurationSmall) -> RawVal
fn from(b: DurationSmall) -> RawVal
Converts to this type from the input type.
source§impl FromValue for DurationSmall
impl FromValue for DurationSmall
source§fn from_value(val: Value) -> Option<DurationSmall>
fn from_value(val: Value) -> Option<DurationSmall>
source§impl Hash for DurationSmall
impl Hash for DurationSmall
source§impl Ord for DurationSmall
impl Ord for DurationSmall
source§fn cmp(&self, other: &DurationSmall) -> Ordering
fn cmp(&self, other: &DurationSmall) -> Ordering
1.21.0 · source§fn 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
source§impl PartialEq<DurationSmall> for DurationSmall
impl PartialEq<DurationSmall> for DurationSmall
source§fn eq(&self, other: &DurationSmall) -> bool
fn eq(&self, other: &DurationSmall) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<DurationSmall> for DurationSmall
impl PartialOrd<DurationSmall> for DurationSmall
source§fn partial_cmp(&self, other: &DurationSmall) -> Option<Ordering>
fn partial_cmp(&self, other: &DurationSmall) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl RawValConvertible for DurationSmall
impl RawValConvertible for DurationSmall
source§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
.source§unsafe fn unchecked_from_val(v: RawVal) -> DurationSmall
unsafe fn unchecked_from_val(v: RawVal) -> DurationSmall
Converts the bits making up a
Val
into Self
without checking
that the Val
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”).source§fn try_convert(v: RawVal) -> Option<Self>
fn try_convert(v: RawVal) -> Option<Self>
Attempt a conversion from
Val
to Self
, returning None
if the
provided Val
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
.source§impl TryFrom<&RawVal> for DurationSmall
impl TryFrom<&RawVal> for DurationSmall
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
source§fn try_from(
v: &RawVal
) -> Result<DurationSmall, <DurationSmall as TryFrom<&RawVal>>::Error>
fn try_from( v: &RawVal ) -> Result<DurationSmall, <DurationSmall as TryFrom<&RawVal>>::Error>
Performs the conversion.
source§impl TryFrom<DurationVal> for DurationSmall
impl TryFrom<DurationVal> for DurationSmall
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
source§fn try_from(
s: DurationVal
) -> Result<DurationSmall, <DurationSmall as TryFrom<DurationVal>>::Error>
fn try_from( s: DurationVal ) -> Result<DurationSmall, <DurationSmall as TryFrom<DurationVal>>::Error>
Performs the conversion.
source§impl TryFrom<RawVal> for DurationSmall
impl TryFrom<RawVal> for DurationSmall
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
source§fn try_from(
v: RawVal
) -> Result<DurationSmall, <DurationSmall as TryFrom<RawVal>>::Error>
fn try_from( v: RawVal ) -> Result<DurationSmall, <DurationSmall as TryFrom<RawVal>>::Error>
Performs the conversion.
source§impl<E> TryFromVal<E, DurationSmall> for RawValwhere
E: Env,
impl<E> TryFromVal<E, DurationSmall> for RawValwhere E: Env,
type Error = ConversionError
fn try_from_val( _env: &E, val: &DurationSmall ) -> Result<RawVal, <RawVal as TryFromVal<E, DurationSmall>>::Error>
source§impl<E> TryFromVal<E, RawVal> for DurationSmallwhere
E: Env,
impl<E> TryFromVal<E, RawVal> for DurationSmallwhere E: Env,
type Error = ConversionError
fn try_from_val( _env: &E, val: &RawVal ) -> Result<DurationSmall, <DurationSmall as TryFromVal<E, RawVal>>::Error>
impl Copy for DurationSmall
impl Eq for DurationSmall
Auto Trait Implementations§
impl RefUnwindSafe for DurationSmall
impl Send for DurationSmall
impl Sync for DurationSmall
impl Unpin for DurationSmall
impl UnwindSafe for DurationSmall
Blanket Implementations§
source§impl<T, U, E, C> Compare<(T, U)> for Cwhere
C: Compare<T, Error = E, Error = E> + Compare<U>,
impl<T, U, E, C> Compare<(T, U)> for Cwhere C: Compare<T, Error = E, Error = E> + Compare<U>,
source§impl<T, U, V, E, C> Compare<(T, U, V)> for Cwhere
C: Compare<T, Error = E, Error = E, Error = E> + Compare<U> + Compare<V>,
impl<T, U, V, E, C> Compare<(T, U, V)> for Cwhere C: Compare<T, Error = E, Error = E, Error = E> + Compare<U> + Compare<V>,
source§impl<E> Compare<DurationSmall> for Ewhere
E: Env,
impl<E> Compare<DurationSmall> for Ewhere E: Env,
type Error = <E as EnvBase>::Error
fn compare( &self, a: &DurationSmall, b: &DurationSmall ) -> Result<Ordering, <E as Compare<DurationSmall>>::Error>
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.