Struct concordium_std::EntrypointName
source · pub struct EntrypointName<'a>(/* private fields */);
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 const fn new_unchecked(name: &'a str) -> EntrypointName<'a>
pub const 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<&'a str> for EntrypointName<'a>
impl<'a> PartialEq<&'a str> for EntrypointName<'a>
source§impl<'a> PartialEq<str> for EntrypointName<'a>
impl<'a> PartialEq<str> for EntrypointName<'a>
source§impl<'a> PartialEq for EntrypointName<'a>
impl<'a> PartialEq 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 for EntrypointName<'a>
impl<'a> PartialOrd 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 moresource§impl<'a> Serial for EntrypointName<'a>
impl<'a> Serial for EntrypointName<'a>
impl<'a> Copy for EntrypointName<'a>
impl<'a> Eq for EntrypointName<'a>
impl<'a> StructuralPartialEq for EntrypointName<'a>
Auto Trait Implementations§
impl<'a> Freeze for EntrypointName<'a>
impl<'a> RefUnwindSafe for EntrypointName<'a>
impl<'a> Send for EntrypointName<'a>
impl<'a> Sync for EntrypointName<'a>
impl<'a> Unpin for EntrypointName<'a>
impl<'a> UnwindSafe for EntrypointName<'a>
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