pub struct String<const N: usize>(_);
Expand description
Stack-allocated mutable string with capacity of 1KB
use toad_string::String;
assert_eq!(String::<16>::from("ron stampler").as_str(), "ron stampler")
Resize the String to a new length
If M
is less than N
, the extra bytes are
discarded.
Get a mutable reference to the inner writable buffer
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Returns the “default value” for a type.
Read more
Formats the value using the given formatter.
Read more
Converts to this type from the input type.
This method tests for self
and other
values to be equal, and is used
by ==
.
This method tests for !=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Writes a string slice into this writer, returning whether the write
succeeded.
Read more
Writes a
char
into this writer, returning whether the write succeeded.
Read more
Glue for usage of the
write!
macro with implementors of this trait.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
Converts the given value to a
String
.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.