pub struct OwnedContractName(/* private fields */);
Expand description
A contract name (owned version). Expected format: “init_<contract_name>”.
Implementations§
source§impl 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 const fn new_unchecked(name: String) -> Self
pub const 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§
source§impl Clone for OwnedContractName
impl Clone for OwnedContractName
source§fn clone(&self) -> OwnedContractName
fn clone(&self) -> OwnedContractName
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 OwnedContractName
impl Debug for OwnedContractName
source§impl Deserial for OwnedContractName
impl Deserial for OwnedContractName
source§impl<'de> Deserialize<'de> for OwnedContractName
impl<'de> Deserialize<'de> for OwnedContractName
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for OwnedContractName
impl Display for OwnedContractName
source§impl From<OwnedContractName> for String
impl From<OwnedContractName> for String
source§fn from(n: OwnedContractName) -> Self
fn from(n: OwnedContractName) -> Self
Converts to this type from the input type.
source§impl Hash for OwnedContractName
impl Hash for OwnedContractName
source§impl Ord for OwnedContractName
impl Ord for OwnedContractName
source§fn cmp(&self, other: &OwnedContractName) -> Ordering
fn cmp(&self, other: &OwnedContractName) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'a> PartialEq<&'a str> for OwnedContractName
impl<'a> PartialEq<&'a str> for OwnedContractName
source§impl PartialEq<str> for OwnedContractName
impl PartialEq<str> for OwnedContractName
source§impl PartialEq for OwnedContractName
impl PartialEq for OwnedContractName
source§fn 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 ==
.source§impl PartialOrd for OwnedContractName
impl PartialOrd for OwnedContractName
source§fn partial_cmp(&self, other: &OwnedContractName) -> Option<Ordering>
fn partial_cmp(&self, other: &OwnedContractName) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl SchemaType for OwnedContractName
impl SchemaType for OwnedContractName
source§impl Serial for OwnedContractName
impl Serial for OwnedContractName
source§impl Serialize for OwnedContractName
impl Serialize for OwnedContractName
source§impl TryFrom<String> for OwnedContractName
impl TryFrom<String> for OwnedContractName
impl Eq for OwnedContractName
impl StructuralPartialEq for OwnedContractName
Auto Trait Implementations§
impl Freeze for OwnedContractName
impl RefUnwindSafe for OwnedContractName
impl Send for OwnedContractName
impl Sync for OwnedContractName
impl Unpin for OwnedContractName
impl UnwindSafe for OwnedContractName
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