pub struct OwnedContractName(_);
Expand description
A contract name (owned version). Expected format: “init_<contract_name>”.
Implementations
sourceimpl OwnedContractName
impl OwnedContractName
sourcepub fn new(name: String) -> Result<Self, NewContractNameError>
pub fn new(name: String) -> Result<Self, NewContractNameError>
Create a new OwnedContractName and check the format. Expected format: “init_<contract_name>”.
sourcepub fn new_unchecked(name: String) -> Self
pub fn new_unchecked(name: String) -> Self
Create a new OwnedContractName without checking the format. Expected format: “init_<contract_name>”.
sourcepub fn as_contract_name(&self) -> ContractName<'_>
pub fn as_contract_name(&self) -> ContractName<'_>
Convert to ContractName by reference.
Trait Implementations
sourceimpl Clone for OwnedContractName
impl Clone for OwnedContractName
sourcefn clone(&self) -> OwnedContractName
fn clone(&self) -> OwnedContractName
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 OwnedContractName
impl Debug for OwnedContractName
sourceimpl Deserial for OwnedContractName
impl Deserial for OwnedContractName
sourceimpl From<OwnedContractName> for String
impl From<OwnedContractName> for String
sourcefn from(n: OwnedContractName) -> Self
fn from(n: OwnedContractName) -> Self
Converts to this type from the input type.
sourceimpl Hash for OwnedContractName
impl Hash for OwnedContractName
sourceimpl Ord for OwnedContractName
impl Ord for OwnedContractName
sourcefn cmp(&self, other: &OwnedContractName) -> Ordering
fn cmp(&self, other: &OwnedContractName) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<OwnedContractName> for OwnedContractName
impl PartialEq<OwnedContractName> for OwnedContractName
sourcefn eq(&self, other: &OwnedContractName) -> bool
fn eq(&self, other: &OwnedContractName) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialOrd<OwnedContractName> for OwnedContractName
impl PartialOrd<OwnedContractName> for OwnedContractName
sourcefn partial_cmp(&self, other: &OwnedContractName) -> Option<Ordering>
fn partial_cmp(&self, other: &OwnedContractName) -> 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 SchemaType for OwnedContractName
impl SchemaType for OwnedContractName
sourceimpl Serial for OwnedContractName
impl Serial for OwnedContractName
sourceimpl TryFrom<String> for OwnedContractName
impl TryFrom<String> for OwnedContractName
impl Eq for OwnedContractName
impl StructuralEq for OwnedContractName
impl StructuralPartialEq for OwnedContractName
Auto Trait Implementations
impl RefUnwindSafe for OwnedContractName
impl Send for OwnedContractName
impl Sync for OwnedContractName
impl Unpin for OwnedContractName
impl UnwindSafe for OwnedContractName
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more