pub struct StringNonFungibleLocalId(Cow<'static, str>);
Expand description
A string matching [_0-9a-zA-Z]{1,64}
.
Tuple Fields§
§0: Cow<'static, str>
Implementations§
source§impl StringNonFungibleLocalId
impl StringNonFungibleLocalId
pub fn new<S>(id: S) -> Result<StringNonFungibleLocalId, ContentValidationError>
pub const fn validate_slice(slice: &[u8]) -> Result<(), ContentValidationError>
pub fn value(&self) -> &str
pub fn as_bytes(&self) -> &[u8] ⓘ
Trait Implementations§
source§impl Clone for StringNonFungibleLocalId
impl Clone for StringNonFungibleLocalId
source§fn clone(&self) -> StringNonFungibleLocalId
fn clone(&self) -> StringNonFungibleLocalId
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 From<StringNonFungibleLocalId> for NonFungibleLocalId
impl From<StringNonFungibleLocalId> for NonFungibleLocalId
source§fn from(value: StringNonFungibleLocalId) -> NonFungibleLocalId
fn from(value: StringNonFungibleLocalId) -> NonFungibleLocalId
Converts to this type from the input type.
source§impl Hash for StringNonFungibleLocalId
impl Hash for StringNonFungibleLocalId
source§impl IsNonFungibleLocalId for StringNonFungibleLocalId
impl IsNonFungibleLocalId for StringNonFungibleLocalId
fn id_type() -> NonFungibleIdType
source§impl Ord for StringNonFungibleLocalId
impl Ord for StringNonFungibleLocalId
source§fn cmp(&self, other: &StringNonFungibleLocalId) -> Ordering
fn cmp(&self, other: &StringNonFungibleLocalId) -> 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 PartialEq for StringNonFungibleLocalId
impl PartialEq for StringNonFungibleLocalId
source§fn eq(&self, other: &StringNonFungibleLocalId) -> bool
fn eq(&self, other: &StringNonFungibleLocalId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for StringNonFungibleLocalId
impl PartialOrd for StringNonFungibleLocalId
source§fn partial_cmp(&self, other: &StringNonFungibleLocalId) -> Option<Ordering>
fn partial_cmp(&self, other: &StringNonFungibleLocalId) -> 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 TryFrom<&str> for StringNonFungibleLocalId
impl TryFrom<&str> for StringNonFungibleLocalId
§type Error = ContentValidationError
type Error = ContentValidationError
The type returned in the event of a conversion error.
source§fn try_from(
value: &str
) -> Result<StringNonFungibleLocalId, <StringNonFungibleLocalId as TryFrom<&str>>::Error>
fn try_from( value: &str ) -> Result<StringNonFungibleLocalId, <StringNonFungibleLocalId as TryFrom<&str>>::Error>
Performs the conversion.
source§impl TryFrom<String> for StringNonFungibleLocalId
impl TryFrom<String> for StringNonFungibleLocalId
§type Error = ContentValidationError
type Error = ContentValidationError
The type returned in the event of a conversion error.
source§fn try_from(
value: String
) -> Result<StringNonFungibleLocalId, <StringNonFungibleLocalId as TryFrom<String>>::Error>
fn try_from( value: String ) -> Result<StringNonFungibleLocalId, <StringNonFungibleLocalId as TryFrom<String>>::Error>
Performs the conversion.
impl Eq for StringNonFungibleLocalId
impl IsNonAutoGeneratedNonFungibleLocalId for StringNonFungibleLocalId
impl StructuralPartialEq for StringNonFungibleLocalId
Auto Trait Implementations§
impl RefUnwindSafe for StringNonFungibleLocalId
impl Send for StringNonFungibleLocalId
impl Sync for StringNonFungibleLocalId
impl Unpin for StringNonFungibleLocalId
impl UnwindSafe for StringNonFungibleLocalId
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more