Struct concordium_std::EntrypointName
source · pub struct EntrypointName<'a>(_);
Expand description
An entrypoint name (borrowed version). Expected format: “<func_name>” where the name of the function consists solely of ASCII alphanumeric or punctuation characters.
Implementations§
source§impl<'a> EntrypointName<'a>
impl<'a> EntrypointName<'a>
sourcepub fn new(name: &'a str) -> Result<EntrypointName<'a>, NewReceiveNameError>
pub fn new(name: &'a str) -> Result<EntrypointName<'a>, NewReceiveNameError>
Create a new name and check the format. See is_valid_entrypoint_name for the expected format.
sourcepub fn to_owned(&self) -> OwnedEntrypointName
pub fn to_owned(&self) -> OwnedEntrypointName
Convert a EntrypointName
to its owned counterpart. This is an
expensive operation that requires memory allocation.
sourcepub fn new_unchecked(name: &'a str) -> EntrypointName<'a>
pub fn new_unchecked(name: &'a str) -> EntrypointName<'a>
Create a new name. This does not check the format and is therefore unsafe. It is provided for convenience since sometimes it is statically clear that the format is satisfied.
Trait Implementations§
source§impl<'a> Clone for EntrypointName<'a>
impl<'a> Clone for EntrypointName<'a>
source§fn clone(&self) -> EntrypointName<'a>
fn clone(&self) -> EntrypointName<'a>
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<'a> Debug for EntrypointName<'a>
impl<'a> Debug for EntrypointName<'a>
source§impl<'a> Display for EntrypointName<'a>
impl<'a> Display for EntrypointName<'a>
source§impl<'a> From<EntrypointName<'a>> for &'a str
impl<'a> From<EntrypointName<'a>> for &'a str
source§fn from(en: EntrypointName<'a>) -> &'a str
fn from(en: EntrypointName<'a>) -> &'a str
Converts to this type from the input type.
source§impl<'a> From<EntrypointName<'a>> for OwnedEntrypointName
impl<'a> From<EntrypointName<'a>> for OwnedEntrypointName
source§fn from(epn: EntrypointName<'a>) -> OwnedEntrypointName
fn from(epn: EntrypointName<'a>) -> OwnedEntrypointName
Converts to this type from the input type.
source§impl<'a> Hash for EntrypointName<'a>
impl<'a> Hash for EntrypointName<'a>
source§impl<'a> Ord for EntrypointName<'a>
impl<'a> Ord for EntrypointName<'a>
source§fn cmp(&self, other: &EntrypointName<'a>) -> Ordering
fn cmp(&self, other: &EntrypointName<'a>) -> 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<EntrypointName<'a>> for EntrypointName<'a>
impl<'a> PartialEq<EntrypointName<'a>> for EntrypointName<'a>
source§fn eq(&self, other: &EntrypointName<'a>) -> bool
fn eq(&self, other: &EntrypointName<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd<EntrypointName<'a>> for EntrypointName<'a>
impl<'a> PartialOrd<EntrypointName<'a>> for EntrypointName<'a>
source§fn partial_cmp(&self, other: &EntrypointName<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &EntrypointName<'a>) -> 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 more