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 duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for EntrypointName<'a>
Source§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>
impl<'a> Eq 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 (const: unstable) · 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 for EntrypointName<'a>
impl<'a> PartialEq for EntrypointName<'a>
Source§fn eq(&self, other: &EntrypointName<'a>) -> bool
fn eq(&self, other: &EntrypointName<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.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> PartialOrd for EntrypointName<'a>
impl<'a> PartialOrd for EntrypointName<'a>
Source§impl<'a> Serial for EntrypointName<'a>
impl<'a> Serial 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> UnsafeUnpin 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