multiversx_sc::api

Trait HandleConstraints

Source
pub trait HandleConstraints:
    TryStaticCast
    + Debug
    + Clone
    + From<RawHandle>
    + PartialEq
    + PartialEq<RawHandle> {
    // Required methods
    fn new(handle: RawHandle) -> Self;
    fn to_be_bytes(&self) -> [u8; 4];
    fn get_raw_handle(&self) -> RawHandle;

    // Provided methods
    fn cast_or_signal_error<E: ErrorApi, U: TryStaticCast>(self) -> U { ... }
    fn get_raw_handle_unchecked(&self) -> RawHandle { ... }
}

Required Methods§

Source

fn new(handle: RawHandle) -> Self

Source

fn to_be_bytes(&self) -> [u8; 4]

Source

fn get_raw_handle(&self) -> RawHandle

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl HandleConstraints for i32

Source§

fn new(handle: RawHandle) -> Self

Source§

fn to_be_bytes(&self) -> [u8; 4]

Source§

fn get_raw_handle(&self) -> RawHandle

Implementors§