Struct fuel_indexer::prelude::SizedAsciiString
pub struct SizedAsciiString<const LEN: usize> { /* private fields */ }
Implementations§
§impl<const LEN: usize> SizedAsciiString<LEN>
impl<const LEN: usize> SizedAsciiString<LEN>
pub fn new(data: String) -> Result<SizedAsciiString<LEN>, Error>
pub fn to_trimmed_str(&self) -> &str
pub fn to_left_trimmed_str(&self) -> &str
pub fn to_right_trimmed_str(&self) -> &str
pub fn new_with_right_whitespace_padding(
data: String
) -> Result<SizedAsciiString<LEN>, Error>
pub fn new_with_right_whitespace_padding( data: String ) -> Result<SizedAsciiString<LEN>, Error>
Pad data
string with whitespace characters on the right to fit into the SizedAsciiString
Trait Implementations§
§impl<const LEN: usize> AsRef<[u8]> for SizedAsciiString<LEN>
impl<const LEN: usize> AsRef<[u8]> for SizedAsciiString<LEN>
§impl<const LEN: usize> Clone for SizedAsciiString<LEN>
impl<const LEN: usize> Clone for SizedAsciiString<LEN>
§fn clone(&self) -> SizedAsciiString<LEN>
fn clone(&self) -> SizedAsciiString<LEN>
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 more§impl<const LEN: usize> Debug for SizedAsciiString<LEN>
impl<const LEN: usize> Debug for SizedAsciiString<LEN>
§impl<const LEN: usize> Default for SizedAsciiString<LEN>
impl<const LEN: usize> Default for SizedAsciiString<LEN>
§fn default() -> SizedAsciiString<LEN>
fn default() -> SizedAsciiString<LEN>
Returns the “default value” for a type. Read more
§impl<'de, const LEN: usize> Deserialize<'de> for SizedAsciiString<LEN>
impl<'de, const LEN: usize> Deserialize<'de> for SizedAsciiString<LEN>
§fn deserialize<D>(
deserializer: D
) -> Result<SizedAsciiString<LEN>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<SizedAsciiString<LEN>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl<const LEN: usize> Display for SizedAsciiString<LEN>
impl<const LEN: usize> Display for SizedAsciiString<LEN>
§impl<const LEN: usize> From<SizedAsciiString<LEN>> for String
impl<const LEN: usize> From<SizedAsciiString<LEN>> for String
§fn from(sized_ascii_str: SizedAsciiString<LEN>) -> String
fn from(sized_ascii_str: SizedAsciiString<LEN>) -> String
Converts to this type from the input type.
§impl<const LEN: usize> Hash for SizedAsciiString<LEN>
impl<const LEN: usize> Hash for SizedAsciiString<LEN>
§impl<const LEN: usize> Parameterize for SizedAsciiString<LEN>
impl<const LEN: usize> Parameterize for SizedAsciiString<LEN>
fn param_type() -> ParamType
§impl<const LEN: usize> PartialEq<&str> for SizedAsciiString<LEN>
impl<const LEN: usize> PartialEq<&str> for SizedAsciiString<LEN>
§impl<const LEN: usize> PartialEq<SizedAsciiString<LEN>> for &str
impl<const LEN: usize> PartialEq<SizedAsciiString<LEN>> for &str
§fn eq(&self, other: &SizedAsciiString<LEN>) -> bool
fn eq(&self, other: &SizedAsciiString<LEN>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl<const LEN: usize> PartialEq for SizedAsciiString<LEN>
impl<const LEN: usize> PartialEq for SizedAsciiString<LEN>
§fn eq(&self, other: &SizedAsciiString<LEN>) -> bool
fn eq(&self, other: &SizedAsciiString<LEN>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl<const LEN: usize> Serialize for SizedAsciiString<LEN>
impl<const LEN: usize> Serialize for SizedAsciiString<LEN>
§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
§impl<const LEN: usize> Tokenizable for SizedAsciiString<LEN>
impl<const LEN: usize> Tokenizable for SizedAsciiString<LEN>
§fn from_token(token: Token) -> Result<SizedAsciiString<LEN>, Error>where
SizedAsciiString<LEN>: Sized,
fn from_token(token: Token) -> Result<SizedAsciiString<LEN>, Error>where
SizedAsciiString<LEN>: Sized,
Converts a
Token
into expected type.§fn into_token(self) -> Token
fn into_token(self) -> Token
Converts a specified type back into token.
§impl<const LEN: usize> TryFrom<&str> for SizedAsciiString<LEN>
impl<const LEN: usize> TryFrom<&str> for SizedAsciiString<LEN>
§impl<const LEN: usize> TryFrom<String> for SizedAsciiString<LEN>
impl<const LEN: usize> TryFrom<String> for SizedAsciiString<LEN>
impl<const LEN: usize> Eq for SizedAsciiString<LEN>
impl<const LEN: usize> StructuralEq for SizedAsciiString<LEN>
impl<const LEN: usize> StructuralPartialEq for SizedAsciiString<LEN>
Auto Trait Implementations§
impl<const LEN: usize> RefUnwindSafe for SizedAsciiString<LEN>
impl<const LEN: usize> Send for SizedAsciiString<LEN>
impl<const LEN: usize> Sync for SizedAsciiString<LEN>
impl<const LEN: usize> Unpin for SizedAsciiString<LEN>
impl<const LEN: usize> UnwindSafe for SizedAsciiString<LEN>
Blanket Implementations§
source§impl<T> AnyDebug for T
impl<T> AnyDebug for T
source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
Returns a reference to the underlying type as
Any
.§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
§impl<A, T> AsBits<T> for A
impl<A, T> AsBits<T> for A
§impl<T> Base32Len for T
impl<T> Base32Len for T
§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
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
§impl<T> CallHasher for T
impl<T> CallHasher for T
§impl<T> Conv for T
impl<T> Conv for T
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§impl<T> DynamicRequestExt for Twhere
T: Into<Request>,
impl<T> DynamicRequestExt for Twhere
T: Into<Request>,
§fn root_value(self, value: FieldValue<'static>) -> DynamicRequest
fn root_value(self, value: FieldValue<'static>) -> DynamicRequest
Specify the root value for the request
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
§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
§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
Compare self to
key
and return true
if they are equal.§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
Formats each item in a sequence. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StorageAsMut for T
impl<T> StorageAsMut for T
fn storage<Type>(&mut self) -> StorageMut<'_, Self, Type>where
Type: Mappable,
fn storage_as_mut<Type>(&mut self) -> StorageMut<'_, Self, Type>where
Type: Mappable,
§impl<T> StorageAsRef for T
impl<T> StorageAsRef for T
fn storage<Type>(&self) -> StorageRef<'_, Self, Type>where
Type: Mappable,
fn storage_as_ref<Type>(&self) -> StorageRef<'_, Self, Type>where
Type: Mappable,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref()
only in debug builds, and is erased in release
builds.§impl<T> ToBase32 for T
impl<T> ToBase32 for T
source§impl<T> ToHex for T
impl<T> ToHex for T
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T> Upcastable for T
impl<T> Upcastable for T
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref
§fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
upcast boxed dyn