Struct concordium_std::OwnedContractName [−][src]
pub struct OwnedContractName(_);
Expand description
A contract name (owned version). Expected format: “init_<contract_name>”.
Implementations
impl OwnedContractName[src]
impl OwnedContractName[src]pub fn new(name: String) -> Result<OwnedContractName, NewContractNameError>[src]
pub fn new(name: String) -> Result<OwnedContractName, NewContractNameError>[src]Create a new OwnedContractName and check the format. Expected format: “init_<contract_name>”.
pub fn new_unchecked(name: String) -> OwnedContractName[src]
pub fn new_unchecked(name: String) -> OwnedContractName[src]Create a new OwnedContractName without checking the format. Expected format: “init_<contract_name>”.
pub fn get_chain_name(&self) -> &String[src]
pub fn get_chain_name(&self) -> &String[src]Get contract name used on chain: “init_<contract_name>”.
pub fn contract_name(&self) -> Option<&str>[src]
pub fn contract_name(&self) -> Option<&str>[src]Try to extract the contract name by removing the “init_” prefix.
pub fn as_ref(&self) -> ContractName<'_>[src]
pub fn as_ref(&self) -> ContractName<'_>[src]Convert to ContractName by reference.
Trait Implementations
impl Debug for OwnedContractName[src]
impl Debug for OwnedContractName[src]impl Deserial for OwnedContractName[src]
impl Deserial for OwnedContractName[src]pub fn deserial<R>(source: &mut R) -> Result<OwnedContractName, ParseError> where
R: Read, [src]
pub fn deserial<R>(source: &mut R) -> Result<OwnedContractName, ParseError> where
R: Read, [src]Attempt to read a structure from a given source, failing if an error occurs during deserialization or reading. Read more
impl PartialEq<OwnedContractName> for OwnedContractName[src]
impl PartialEq<OwnedContractName> for OwnedContractName[src]pub fn eq(&self, other: &OwnedContractName) -> bool[src]
pub fn eq(&self, other: &OwnedContractName) -> bool[src]This method tests for self and other values to be equal, and is used
by ==. Read more
pub fn ne(&self, other: &OwnedContractName) -> bool[src]
pub fn ne(&self, other: &OwnedContractName) -> bool[src]This method tests for !=.
impl SchemaType for OwnedContractName[src]
impl SchemaType for OwnedContractName[src]impl Serial for OwnedContractName[src]
impl Serial for OwnedContractName[src]impl Eq for OwnedContractName[src]
impl StructuralEq for OwnedContractName[src]
impl StructuralPartialEq for OwnedContractName[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<A> Serialize for A where
A: Deserial + Serial, [src]
A: Deserial + Serial,