Struct concordium_std::OwnedContractName
source · pub struct OwnedContractName(_);
Expand description
A contract name (owned version). Expected format: “init_<contract_name>”.
Implementations§
source§impl OwnedContractName
impl OwnedContractName
sourcepub fn new(name: String) -> Result<OwnedContractName, NewContractNameError>
pub fn new(name: String) -> Result<OwnedContractName, NewContractNameError>
Create a new OwnedContractName and check the format. Expected format: “init_<contract_name>”.
sourcepub fn new_unchecked(name: String) -> OwnedContractName
pub fn new_unchecked(name: String) -> OwnedContractName
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§fn deserial<R>(source: &mut R) -> Result<OwnedContractName, ParseError>where
R: Read,
fn deserial<R>(source: &mut R) -> Result<OwnedContractName, ParseError>where
R: Read,
Attempt to read a structure from a given source, failing if an error
occurs during deserialization or reading. Read more
source§impl From<OwnedContractName> for String
impl From<OwnedContractName> for String
source§fn from(n: OwnedContractName) -> String
fn from(n: OwnedContractName) -> String
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 PartialEq<OwnedContractName> for OwnedContractName
impl PartialEq<OwnedContractName> for OwnedContractName
source§fn eq(&self, other: &OwnedContractName) -> bool
fn eq(&self, other: &OwnedContractName) -> bool
source§impl PartialOrd<OwnedContractName> for OwnedContractName
impl PartialOrd<OwnedContractName> 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 TryFrom<String> for OwnedContractName
impl TryFrom<String> for OwnedContractName
§type Error = NewContractNameError
type Error = NewContractNameError
The type returned in the event of a conversion error.
source§fn try_from(
value: String
) -> Result<OwnedContractName, <OwnedContractName as TryFrom<String>>::Error>
fn try_from(
value: String
) -> Result<OwnedContractName, <OwnedContractName as TryFrom<String>>::Error>
Performs the conversion.