pub struct HsNickname(Slug);
Expand description
Tuple Fields§
§0: Slug
Implementations§
Source§impl HsNickname
impl HsNickname
Sourcepub fn new(s: String) -> Result<HsNickname, InvalidNickname>
pub fn new(s: String) -> Result<HsNickname, InvalidNickname>
Create a new HsNickname
from a String
Returns an error if the syntax is not valid
Trait Implementations§
Source§impl AsRef<str> for HsNickname
impl AsRef<str> for HsNickname
Source§impl Clone for HsNickname
impl Clone for HsNickname
Source§fn clone(&self) -> HsNickname
fn clone(&self) -> HsNickname
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 HsNickname
impl Debug for HsNickname
Source§impl<'de> Deserialize<'de> for HsNickname
impl<'de> Deserialize<'de> for HsNickname
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 Display for HsNickname
impl Display for HsNickname
Source§impl From<HsNickname> for Slug
impl From<HsNickname> for Slug
Source§fn from(value: HsNickname) -> Self
fn from(value: HsNickname) -> Self
Converts to this type from the input type.
Source§impl From<HsNickname> for String
impl From<HsNickname> for String
Source§fn from(nick: HsNickname) -> String
fn from(nick: HsNickname) -> String
Converts to this type from the input type.
Source§impl From<Slug> for HsNickname
impl From<Slug> for HsNickname
Source§impl FromStr for HsNickname
impl FromStr for HsNickname
Source§impl Hash for HsNickname
impl Hash for HsNickname
Source§impl InstanceIdentity for HsNickname
Available on crate feature state-dir
only.
impl InstanceIdentity for HsNickname
Available on crate feature
state-dir
only.Source§impl Ord for HsNickname
impl Ord for HsNickname
Source§fn cmp(&self, other: &HsNickname) -> Ordering
fn cmp(&self, other: &HsNickname) -> 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 HsNickname
impl PartialEq for HsNickname
Source§impl PartialOrd for HsNickname
impl PartialOrd for HsNickname
Source§impl Serialize for HsNickname
impl Serialize for HsNickname
Source§impl TryFrom<String> for HsNickname
impl TryFrom<String> for HsNickname
Source§type Error = InvalidNickname
type Error = InvalidNickname
The type returned in the event of a conversion error.
Source§fn try_from(s: String) -> Result<HsNickname, InvalidNickname>
fn try_from(s: String) -> Result<HsNickname, InvalidNickname>
Performs the conversion.
impl Eq for HsNickname
impl StructuralPartialEq for HsNickname
Auto Trait Implementations§
impl Freeze for HsNickname
impl RefUnwindSafe for HsNickname
impl Send for HsNickname
impl Sync for HsNickname
impl Unpin for HsNickname
impl UnwindSafe for HsNickname
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more