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 Hash for OwnedReceiveName
impl Hash for OwnedReceiveName
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
sourcefn ne(&self, other: &OwnedReceiveName) -> bool
fn ne(&self, other: &OwnedReceiveName) -> bool
This method tests for !=
.
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more