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
sourceimpl 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
sourceimpl Clone for OwnedReceiveName
impl Clone for OwnedReceiveName
sourcefn clone(&self) -> OwnedReceiveName
fn clone(&self) -> OwnedReceiveName
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for OwnedReceiveName
impl Debug for OwnedReceiveName
sourceimpl Deserial for OwnedReceiveName
impl Deserial for OwnedReceiveName
sourcefn 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. Read more
sourceimpl FromStr for OwnedReceiveName
impl FromStr for OwnedReceiveName
type Err = NewReceiveNameError
type Err = NewReceiveNameError
The associated error which can be returned from parsing.
sourcefn 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 more
sourceimpl Hash for OwnedReceiveName
impl Hash for OwnedReceiveName
sourceimpl Ord for OwnedReceiveName
impl Ord for OwnedReceiveName
sourcefn cmp(&self, other: &OwnedReceiveName) -> Ordering
fn cmp(&self, other: &OwnedReceiveName) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<OwnedReceiveName> for OwnedReceiveName
impl PartialEq<OwnedReceiveName> for OwnedReceiveName
sourcefn 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 ==
. Read more
sourceimpl PartialOrd<OwnedReceiveName> for OwnedReceiveName
impl PartialOrd<OwnedReceiveName> for OwnedReceiveName
sourcefn partial_cmp(&self, other: &OwnedReceiveName) -> Option<Ordering>
fn partial_cmp(&self, other: &OwnedReceiveName) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl SchemaType for OwnedReceiveName
impl SchemaType for OwnedReceiveName
sourceimpl Serial for OwnedReceiveName
impl Serial for OwnedReceiveName
sourceimpl 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.
sourcefn 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more