pub struct Description(/* private fields */);
Expand description
Implementations§
Source§impl Description
impl Description
Sourcepub fn new(description: String) -> Result<Description, CreationError>
pub fn new(description: String) -> Result<Description, CreationError>
Creates a new Description
if description
is at most 1023 * 5 bits (i.e., 639 bytes)
long, and returns CreationError::DescriptionTooLong
otherwise.
Please note that single characters may use more than one byte due to UTF8 encoding.
Sourcepub fn into_inner(self) -> UntrustedString
pub fn into_inner(self) -> UntrustedString
Returns the underlying description UntrustedString
Sourcepub fn as_inner(&self) -> &UntrustedString
pub fn as_inner(&self) -> &UntrustedString
Get a reference to the underlying description UntrustedString
Trait Implementations§
Source§impl Clone for Description
impl Clone for Description
Source§fn clone(&self) -> Description
fn clone(&self) -> Description
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 Debug for Description
impl Debug for Description
Source§impl Default for Description
impl Default for Description
Source§fn default() -> Description
fn default() -> Description
Returns the “default value” for a type. Read more
Source§impl Display for Description
impl Display for Description
Source§impl Hash for Description
impl Hash for Description
Source§impl Ord for Description
impl Ord for Description
Source§fn cmp(&self, other: &Description) -> Ordering
fn cmp(&self, other: &Description) -> 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 Description
impl PartialEq for Description
Source§impl PartialOrd for Description
impl PartialOrd for Description
impl Eq for Description
impl StructuralPartialEq for Description
Auto Trait Implementations§
impl Freeze for Description
impl RefUnwindSafe for Description
impl Send for Description
impl Sync for Description
impl Unpin for Description
impl UnwindSafe for Description
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