Struct soroban_env_common::BytesObject
source · #[repr(transparent)]pub struct BytesObject(_);Implementations§
source§impl BytesObject
impl BytesObject
source§impl BytesObject
impl BytesObject
pub const unsafe fn from_handle(handle: u32) -> Self
pub const fn get_handle(&self) -> u32
Trait Implementations§
source§impl AsMut<RawVal> for BytesObject
impl AsMut<RawVal> for BytesObject
source§impl AsRef<RawVal> for BytesObject
impl AsRef<RawVal> for BytesObject
source§impl Clone for BytesObject
impl Clone for BytesObject
source§fn clone(&self) -> BytesObject
fn clone(&self) -> BytesObject
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 BytesObject
impl Debug for BytesObject
source§impl From<&BytesObject> for RawVal
impl From<&BytesObject> for RawVal
source§fn from(b: &BytesObject) -> Self
fn from(b: &BytesObject) -> Self
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<BytesObject> for RawVal
impl From<BytesObject> for RawVal
source§fn from(b: BytesObject) -> Self
fn from(b: BytesObject) -> Self
Converts to this type from the input type.
source§impl From<BytesObject> for Value
impl From<BytesObject> for Value
source§fn from(v: BytesObject) -> Self
fn from(v: BytesObject) -> Self
Converts to this type from the input type.
source§impl FromValue for BytesObject
impl FromValue for BytesObject
source§impl RawValConvertible for BytesObject
impl RawValConvertible for BytesObject
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) -> Self
unsafe fn unchecked_from_val(v: RawVal) -> Self
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 BytesObject
impl TryFrom<&RawVal> for BytesObject
source§impl TryFrom<Object> for BytesObject
impl TryFrom<Object> for BytesObject
source§impl TryFrom<RawVal> for BytesObject
impl TryFrom<RawVal> for BytesObject
source§impl<E: Env> TryFromVal<E, &[u8]> for BytesObject
impl<E: Env> TryFromVal<E, &[u8]> for BytesObject
source§impl<E: Env, const N: usize> TryFromVal<E, [u8; N]> for BytesObject
impl<E: Env, const N: usize> TryFromVal<E, [u8; N]> for BytesObject
source§impl<E: Env, const N: usize> TryFromVal<E, BytesObject> for [u8; N]
impl<E: Env, const N: usize> TryFromVal<E, BytesObject> for [u8; N]
type Error = Status
fn try_from_val(env: &E, val: &BytesObject) -> Result<Self, Self::Error>
source§impl<E: Env> TryFromVal<E, BytesObject> for RawVal
impl<E: Env> TryFromVal<E, BytesObject> for RawVal
type Error = ConversionError
fn try_from_val(_env: &E, val: &BytesObject) -> Result<Self, Self::Error>
source§impl<E: Env> TryFromVal<E, BytesObject> for Vec<u8>
impl<E: Env> TryFromVal<E, BytesObject> for Vec<u8>
type Error = Status
fn try_from_val(env: &E, val: &BytesObject) -> Result<Self, Self::Error>
source§impl<E: Env> TryFromVal<E, RawVal> for BytesObject
impl<E: Env> TryFromVal<E, RawVal> for BytesObject
type Error = ConversionError
fn try_from_val(_env: &E, val: &RawVal) -> Result<Self, Self::Error>
source§impl<E: Env> TryFromVal<E, Vec<u8, Global>> for BytesObject
impl<E: Env> TryFromVal<E, Vec<u8, Global>> for BytesObject
impl Copy for BytesObject
Auto Trait Implementations§
impl RefUnwindSafe for BytesObject
impl Send for BytesObject
impl Sync for BytesObject
impl Unpin for BytesObject
impl UnwindSafe for BytesObject
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
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<BytesObject> for Ewhere
E: Env,
impl<E> Compare<BytesObject> for Ewhere E: Env,
type Error = <E as EnvBase>::Error
fn compare( &self, a: &BytesObject, b: &BytesObject ) -> Result<Ordering, <E as Compare<BytesObject>>::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.