Struct soroban_env_host::Object
source · pub struct Object(_);
Expand description
Implementations§
Trait Implementations§
source§impl From<AddressObject> for Object
impl From<AddressObject> for Object
source§fn from(x: AddressObject) -> Object
fn from(x: AddressObject) -> Object
Converts to this type from the input type.
source§impl From<BytesObject> for Object
impl From<BytesObject> for Object
source§fn from(x: BytesObject) -> Object
fn from(x: BytesObject) -> Object
Converts to this type from the input type.
source§impl From<ContractExecutableObject> for Object
impl From<ContractExecutableObject> for Object
source§fn from(x: ContractExecutableObject) -> Object
fn from(x: ContractExecutableObject) -> Object
Converts to this type from the input type.
source§impl From<DurationObject> for Object
impl From<DurationObject> for Object
source§fn from(x: DurationObject) -> Object
fn from(x: DurationObject) -> Object
Converts to this type from the input type.
source§impl From<I128Object> for Object
impl From<I128Object> for Object
source§fn from(x: I128Object) -> Object
fn from(x: I128Object) -> Object
Converts to this type from the input type.
source§impl From<I256Object> for Object
impl From<I256Object> for Object
source§fn from(x: I256Object) -> Object
fn from(x: I256Object) -> Object
Converts to this type from the input type.
source§impl From<LedgerKeyNonceObject> for Object
impl From<LedgerKeyNonceObject> for Object
source§fn from(x: LedgerKeyNonceObject) -> Object
fn from(x: LedgerKeyNonceObject) -> Object
Converts to this type from the input type.
source§impl From<StringObject> for Object
impl From<StringObject> for Object
source§fn from(x: StringObject) -> Object
fn from(x: StringObject) -> Object
Converts to this type from the input type.
source§impl From<SymbolObject> for Object
impl From<SymbolObject> for Object
source§fn from(x: SymbolObject) -> Object
fn from(x: SymbolObject) -> Object
Converts to this type from the input type.
source§impl From<TimepointObject> for Object
impl From<TimepointObject> for Object
source§fn from(x: TimepointObject) -> Object
fn from(x: TimepointObject) -> Object
Converts to this type from the input type.
source§impl From<U128Object> for Object
impl From<U128Object> for Object
source§fn from(x: U128Object) -> Object
fn from(x: U128Object) -> Object
Converts to this type from the input type.
source§impl From<U256Object> for Object
impl From<U256Object> for Object
source§fn from(x: U256Object) -> Object
fn from(x: U256Object) -> Object
Converts to this type from the input type.
source§impl RawValConvertible for Object
impl RawValConvertible for Object
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) -> Object
unsafe fn unchecked_from_val(v: RawVal) -> Object
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<Object> for AddressObject
impl TryFrom<Object> for AddressObject
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
source§fn try_from(
x: Object
) -> Result<AddressObject, <AddressObject as TryFrom<Object>>::Error>
fn try_from( x: Object ) -> Result<AddressObject, <AddressObject as TryFrom<Object>>::Error>
Performs the conversion.
source§impl TryFrom<Object> for BytesObject
impl TryFrom<Object> for BytesObject
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
source§fn try_from(
x: Object
) -> Result<BytesObject, <BytesObject as TryFrom<Object>>::Error>
fn try_from( x: Object ) -> Result<BytesObject, <BytesObject as TryFrom<Object>>::Error>
Performs the conversion.
source§impl TryFrom<Object> for ContractExecutableObject
impl TryFrom<Object> for ContractExecutableObject
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
source§fn try_from(
x: Object
) -> Result<ContractExecutableObject, <ContractExecutableObject as TryFrom<Object>>::Error>
fn try_from( x: Object ) -> Result<ContractExecutableObject, <ContractExecutableObject as TryFrom<Object>>::Error>
Performs the conversion.
source§impl TryFrom<Object> for DurationObject
impl TryFrom<Object> for DurationObject
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
source§fn try_from(
x: Object
) -> Result<DurationObject, <DurationObject as TryFrom<Object>>::Error>
fn try_from( x: Object ) -> Result<DurationObject, <DurationObject as TryFrom<Object>>::Error>
Performs the conversion.
source§impl TryFrom<Object> for I128Object
impl TryFrom<Object> for I128Object
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
source§fn try_from(
x: Object
) -> Result<I128Object, <I128Object as TryFrom<Object>>::Error>
fn try_from( x: Object ) -> Result<I128Object, <I128Object as TryFrom<Object>>::Error>
Performs the conversion.
source§impl TryFrom<Object> for I256Object
impl TryFrom<Object> for I256Object
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
source§fn try_from(
x: Object
) -> Result<I256Object, <I256Object as TryFrom<Object>>::Error>
fn try_from( x: Object ) -> Result<I256Object, <I256Object as TryFrom<Object>>::Error>
Performs the conversion.
source§impl TryFrom<Object> for LedgerKeyNonceObject
impl TryFrom<Object> for LedgerKeyNonceObject
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
source§fn try_from(
x: Object
) -> Result<LedgerKeyNonceObject, <LedgerKeyNonceObject as TryFrom<Object>>::Error>
fn try_from( x: Object ) -> Result<LedgerKeyNonceObject, <LedgerKeyNonceObject as TryFrom<Object>>::Error>
Performs the conversion.
source§impl TryFrom<Object> for StringObject
impl TryFrom<Object> for StringObject
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
source§fn try_from(
x: Object
) -> Result<StringObject, <StringObject as TryFrom<Object>>::Error>
fn try_from( x: Object ) -> Result<StringObject, <StringObject as TryFrom<Object>>::Error>
Performs the conversion.
source§impl TryFrom<Object> for SymbolObject
impl TryFrom<Object> for SymbolObject
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
source§fn try_from(
x: Object
) -> Result<SymbolObject, <SymbolObject as TryFrom<Object>>::Error>
fn try_from( x: Object ) -> Result<SymbolObject, <SymbolObject as TryFrom<Object>>::Error>
Performs the conversion.
source§impl TryFrom<Object> for TimepointObject
impl TryFrom<Object> for TimepointObject
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
source§fn try_from(
x: Object
) -> Result<TimepointObject, <TimepointObject as TryFrom<Object>>::Error>
fn try_from( x: Object ) -> Result<TimepointObject, <TimepointObject as TryFrom<Object>>::Error>
Performs the conversion.
source§impl TryFrom<Object> for U128Object
impl TryFrom<Object> for U128Object
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
source§fn try_from(
x: Object
) -> Result<U128Object, <U128Object as TryFrom<Object>>::Error>
fn try_from( x: Object ) -> Result<U128Object, <U128Object as TryFrom<Object>>::Error>
Performs the conversion.
source§impl TryFrom<Object> for U256Object
impl TryFrom<Object> for U256Object
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
source§fn try_from(
x: Object
) -> Result<U256Object, <U256Object as TryFrom<Object>>::Error>
fn try_from( x: Object ) -> Result<U256Object, <U256Object as TryFrom<Object>>::Error>
Performs the conversion.
source§impl<E> TryFromVal<E, Object> for RawValwhere
E: Env,
impl<E> TryFromVal<E, Object> for RawValwhere E: Env,
type Error = ConversionError
fn try_from_val( _env: &E, val: &Object ) -> Result<RawVal, <RawVal as TryFromVal<E, Object>>::Error>
source§impl<E> TryFromVal<E, Object> for ScValObjectwhere
E: Env + Convert<Object, ScValObject>,
impl<E> TryFromVal<E, Object> for ScValObjectwhere E: Env + Convert<Object, ScValObject>,
type Error = <E as Convert<Object, ScValObject>>::Error
fn try_from_val( env: &E, val: &Object ) -> Result<ScValObject, <ScValObject as TryFromVal<E, Object>>::Error>
source§impl<E> TryFromVal<E, RawVal> for Objectwhere
E: Env,
impl<E> TryFromVal<E, RawVal> for Objectwhere E: Env,
type Error = ConversionError
fn try_from_val( _env: &E, val: &RawVal ) -> Result<Object, <Object as TryFromVal<E, RawVal>>::Error>
source§impl<'a, E> TryFromVal<E, ScValObjRef<'a>> for Objectwhere
E: Env + Convert<ScValObjRef<'a>, Object>,
impl<'a, E> TryFromVal<E, ScValObjRef<'a>> for Objectwhere E: Env + Convert<ScValObjRef<'a>, Object>,
type Error = ConversionError
fn try_from_val( env: &E, v: &ScValObjRef<'a> ) -> Result<Object, <Object as TryFromVal<E, ScValObjRef<'a>>>::Error>
impl Copy for Object
Auto Trait Implementations§
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
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>,
§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.