Struct rusk_abi::ContractId
source · [−]pub struct ContractId(_);
Expand description
Type used to identify a contract
Implementations
sourceimpl ContractId
impl ContractId
sourcepub const fn reserved(id: u8) -> ContractId
pub const fn reserved(id: u8) -> ContractId
Return a reserved contract id for host fn modules
sourcepub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Returns the contract id as a byte slice
Trait Implementations
sourceimpl Canon for ContractId
impl Canon for ContractId
sourcepub fn decode(source: &mut Source<'_>) -> Result<ContractId, CanonError>
pub fn decode(source: &mut Source<'_>) -> Result<ContractId, CanonError>
Return the decoded value from bytes in a Source
sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the number of bytes needed to encode this value
sourceimpl Clone for ContractId
impl Clone for ContractId
sourcepub fn clone(&self) -> ContractId
pub fn clone(&self) -> ContractId
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ContractId
impl Debug for ContractId
sourceimpl Default for ContractId
impl Default for ContractId
sourcepub fn default() -> ContractId
pub fn default() -> ContractId
Returns the “default value” for a type. Read more
sourceimpl Display for ContractId
impl Display for ContractId
sourceimpl<B> From<B> for ContractId where
B: AsRef<[u8]>,
impl<B> From<B> for ContractId where
B: AsRef<[u8]>,
sourcepub fn from(b: B) -> ContractId
pub fn from(b: B) -> ContractId
Performs the conversion.
sourceimpl Hash for ContractId
impl Hash for ContractId
sourceimpl LowerHex for ContractId
impl LowerHex for ContractId
sourceimpl Ord for ContractId
impl Ord for ContractId
sourceimpl PartialEq<ContractId> for ContractId
impl PartialEq<ContractId> for ContractId
sourcepub fn eq(&self, other: &ContractId) -> bool
pub fn eq(&self, other: &ContractId) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcepub fn ne(&self, other: &ContractId) -> bool
pub fn ne(&self, other: &ContractId) -> bool
This method tests for !=
.
sourceimpl PartialOrd<ContractId> for ContractId
impl PartialOrd<ContractId> for ContractId
sourcepub fn partial_cmp(&self, other: &ContractId) -> Option<Ordering>
pub fn partial_cmp(&self, other: &ContractId) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl UpperHex for ContractId
impl UpperHex for ContractId
impl Copy for ContractId
impl Eq for ContractId
impl StructuralEq for ContractId
impl StructuralPartialEq for ContractId
Auto Trait Implementations
impl RefUnwindSafe for ContractId
impl Send for ContractId
impl Sync for ContractId
impl Unpin for ContractId
impl UnwindSafe for ContractId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> EncodeToVec for T where
T: Canon,
impl<T> EncodeToVec for T where
T: Canon,
sourcepub fn encode_to_vec(&self) -> Vec<u8, Global>
pub fn encode_to_vec(&self) -> Vec<u8, Global>
Encode Self
into a buffer
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more