Struct concordium_std::OwnedContractName
source · 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<OwnedContractName, NewContractNameError>
pub fn new(name: String) -> Result<OwnedContractName, NewContractNameError>
Create a new OwnedContractName and check the format. Expected format: “init_<contract_name>”.
sourcepub const fn new_unchecked(name: String) -> OwnedContractName
pub const 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.
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) -> 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<'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 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.
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
source§impl<D, S> DeserialWithState<S> for Dwhere
D: Deserial,
S: HasStateApi,
impl<D, S> DeserialWithState<S> for Dwhere
D: Deserial,
S: HasStateApi,
source§fn deserial_with_state<R>(_state: &S, source: &mut R) -> Result<D, ParseError>where
R: Read,
fn deserial_with_state<R>(_state: &S, source: &mut R) -> Result<D, ParseError>where
R: Read,
Attempt to read a structure from a given source and state, failing if
an error occurs during deserialization or reading.