Struct concordium_std::OwnedReceiveName
source · pub struct OwnedReceiveName(_);
Expand description
A receive name (owned version). Expected format:
“<contract_name>.<func_name>”. Most methods are available only on the
ReceiveName
type, the intention is to access those via the
as_receive_name
method.
Implementations§
source§impl OwnedReceiveName
impl OwnedReceiveName
sourcepub fn new(name: String) -> Result<OwnedReceiveName, NewReceiveNameError>
pub fn new(name: String) -> Result<OwnedReceiveName, NewReceiveNameError>
Create a new OwnedReceiveName and check the format. Expected format: “<contract_name>.<func_name>”.
sourcepub fn construct(
contract: ContractName<'_>,
entrypoint: EntrypointName<'_>
) -> Result<OwnedReceiveName, NewReceiveNameError>
pub fn construct( contract: ContractName<'_>, entrypoint: EntrypointName<'_> ) -> Result<OwnedReceiveName, NewReceiveNameError>
Construct a receive name from contract and entrypoint names.
sourcepub fn construct_unchecked(
contract: ContractName<'_>,
entrypoint: EntrypointName<'_>
) -> OwnedReceiveName
pub fn construct_unchecked( contract: ContractName<'_>, entrypoint: EntrypointName<'_> ) -> OwnedReceiveName
Construct a receive name from contract and entrypoint names, assuming that the resulting name is valid.
sourcepub fn new_unchecked(name: String) -> OwnedReceiveName
pub fn new_unchecked(name: String) -> OwnedReceiveName
Create a new OwnedReceiveName without checking the format. Expected format: “<contract_name>.<func_name>”.
sourcepub fn as_receive_name(&self) -> ReceiveName<'_>
pub fn as_receive_name(&self) -> ReceiveName<'_>
Convert to ReceiveName
. See ReceiveName
for additional methods
available on the type.
Trait Implementations§
source§impl Clone for OwnedReceiveName
impl Clone for OwnedReceiveName
source§fn clone(&self) -> OwnedReceiveName
fn clone(&self) -> OwnedReceiveName
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 OwnedReceiveName
impl Debug for OwnedReceiveName
source§impl Deserial for OwnedReceiveName
impl Deserial for OwnedReceiveName
source§fn deserial<R>(source: &mut R) -> Result<OwnedReceiveName, ParseError>where
R: Read,
fn deserial<R>(source: &mut R) -> Result<OwnedReceiveName, 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 OwnedReceiveName
impl Display for OwnedReceiveName
source§impl FromStr for OwnedReceiveName
impl FromStr for OwnedReceiveName
§type Err = NewReceiveNameError
type Err = NewReceiveNameError
The associated error which can be returned from parsing.
source§fn from_str(
s: &str
) -> Result<OwnedReceiveName, <OwnedReceiveName as FromStr>::Err>
fn from_str( s: &str ) -> Result<OwnedReceiveName, <OwnedReceiveName as FromStr>::Err>
Parses a string
s
to return a value of this type. Read moresource§impl Hash for OwnedReceiveName
impl Hash for OwnedReceiveName
source§impl Ord for OwnedReceiveName
impl Ord for OwnedReceiveName
source§fn cmp(&self, other: &OwnedReceiveName) -> Ordering
fn cmp(&self, other: &OwnedReceiveName) -> 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 OwnedReceiveName
impl<'a> PartialEq<&'a str> for OwnedReceiveName
source§impl PartialEq<OwnedReceiveName> for OwnedReceiveName
impl PartialEq<OwnedReceiveName> for OwnedReceiveName
source§fn eq(&self, other: &OwnedReceiveName) -> bool
fn eq(&self, other: &OwnedReceiveName) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<str> for OwnedReceiveName
impl PartialEq<str> for OwnedReceiveName
source§impl PartialOrd<OwnedReceiveName> for OwnedReceiveName
impl PartialOrd<OwnedReceiveName> for OwnedReceiveName
source§fn partial_cmp(&self, other: &OwnedReceiveName) -> Option<Ordering>
fn partial_cmp(&self, other: &OwnedReceiveName) -> 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 OwnedReceiveName
impl SchemaType for OwnedReceiveName
source§impl Serial for OwnedReceiveName
impl Serial for OwnedReceiveName
source§impl TryFrom<String> for OwnedReceiveName
impl TryFrom<String> for OwnedReceiveName
§type Error = NewReceiveNameError
type Error = NewReceiveNameError
The type returned in the event of a conversion error.
source§fn try_from(
value: String
) -> Result<OwnedReceiveName, <OwnedReceiveName as TryFrom<String>>::Error>
fn try_from( value: String ) -> Result<OwnedReceiveName, <OwnedReceiveName as TryFrom<String>>::Error>
Performs the conversion.
impl Eq for OwnedReceiveName
impl StructuralEq for OwnedReceiveName
impl StructuralPartialEq for OwnedReceiveName
Auto Trait Implementations§
impl RefUnwindSafe for OwnedReceiveName
impl Send for OwnedReceiveName
impl Sync for OwnedReceiveName
impl Unpin for OwnedReceiveName
impl UnwindSafe for OwnedReceiveName
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.
source§impl<T, S> StateClone<S> for Twhere
T: Clone,
impl<T, S> StateClone<S> for Twhere T: Clone,
source§unsafe fn clone_state(&self, _cloned_state_api: &S) -> T
unsafe fn clone_state(&self, _cloned_state_api: &S) -> T
Make a clone of the type while using the
cloned_state_api
. Read more