pub struct Name(/* private fields */);
Implementations§
Methods from Deref<Target = Confined<AsciiString, 1, 40>>§
Sourcepub fn len_u8(&self) -> u8
pub fn len_u8(&self) -> u8
Returns number of elements in the confined collection as u8
. The
confinement guarantees that the collection length can’t exceed
u8::MAX
.
Sourcepub fn len_u16(&self) -> u16
pub fn len_u16(&self) -> u16
Returns number of elements in the confined collection as u16
. The
confinement guarantees that the collection length can’t exceed
u16::MAX
.
Sourcepub fn len_u24(&self) -> u24
pub fn len_u24(&self) -> u24
Returns number of elements in the confined collection as u24
. The
confinement guarantees that the collection length can’t exceed
u24::MAX
.
Trait Implementations§
Source§impl AsRef<Confined<AsciiString, 1, 40>> for Name
impl AsRef<Confined<AsciiString, 1, 40>> for Name
Source§fn as_ref(&self) -> &Confined<AsciiString, 1, 40>
fn as_ref(&self) -> &Confined<AsciiString, 1, 40>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<'de> Deserialize<'de> for Name
impl<'de> Deserialize<'de> for Name
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Confined<AsciiString, 1, 40>> for Name
impl From<Confined<AsciiString, 1, 40>> for Name
Source§fn from(v: Confined<AsciiString, 1, 40>) -> Self
fn from(v: Confined<AsciiString, 1, 40>) -> Self
Converts to this type from the input type.
Source§impl Ord for Name
impl Ord for Name
Source§impl PartialOrd for Name
impl PartialOrd for Name
Source§impl StrictDecode for Name
impl StrictDecode for Name
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
Source§impl StrictDeserialize for Name
impl StrictDeserialize for Name
fn from_strict_serialized<const MAX: usize>( ast_data: Confined<Vec<u8>, 0, MAX>, ) -> Result<Self, DeserializeError>
fn strict_deserialize_from_file<const MAX: usize>( path: impl AsRef<Path>, ) -> Result<Self, DeserializeError>
Source§impl StrictDumb for Name
impl StrictDumb for Name
fn strict_dumb() -> Self
Source§impl StrictEncode for Name
impl StrictEncode for Name
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, Error>
Source§impl StrictSerialize for Name
impl StrictSerialize for Name
fn strict_serialized_len(&self) -> Result<usize, Error>
fn to_strict_serialized<const MAX: usize>( &self, ) -> Result<Confined<Vec<u8>, 0, MAX>, SerializeError>
fn strict_serialize_to_file<const MAX: usize>( &self, path: impl AsRef<Path>, ) -> Result<(), SerializeError>
Source§impl StrictTuple for Name
impl StrictTuple for Name
const FIELD_COUNT: u8 = 1u8
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for Name
impl StrictType for Name
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_CONTRACT
fn strict_name() -> Option<TypeName>
Source§impl TryFrom<AsciiString> for Name
impl TryFrom<AsciiString> for Name
Source§type Error = InvalidIdent
type Error = InvalidIdent
The type returned in the event of a conversion error.
Source§fn try_from(ascii: AsciiString) -> Result<Self, InvalidIdent>
fn try_from(ascii: AsciiString) -> Result<Self, InvalidIdent>
Performs the conversion.
Source§impl TryFrom<String> for Name
impl TryFrom<String> for Name
Source§type Error = InvalidIdent
type Error = InvalidIdent
The type returned in the event of a conversion error.
Source§impl Wrapper for Name
impl Wrapper for Name
Source§type Inner = Confined<AsciiString, 1, 40>
type Inner = Confined<AsciiString, 1, 40>
Inner type wrapped by the current newtype
Source§fn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Instantiates wrapper type with the inner data
Source§fn as_inner(&self) -> &Self::Inner
fn as_inner(&self) -> &Self::Inner
Returns reference to the inner representation for the wrapper type
Source§fn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Unwraps the wrapper returning the inner type
impl Eq for Name
impl StrictProduct for Name
impl StructuralPartialEq for Name
Auto Trait Implementations§
impl Freeze for Name
impl RefUnwindSafe for Name
impl Send for Name
impl Sync for Name
impl Unpin for Name
impl UnwindSafe for Name
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.