Struct strong::Strong [−][src]
Strongly typed str
Implementations
impl<Ctx: Validator> Strong<Ctx>
[src]
pub fn validate<S: AsRef<str> + ?Sized>(s: &S) -> Result<&Self, Ctx::Err>
[src]
Constructs from str
.
pub unsafe fn no_validate<S: AsRef<str> + ?Sized>(s: &S) -> &Self
[src]
pub fn as_str(&self) -> &str
[src]
Converts to str
.
pub fn as_bytes(&self) -> &[u8]
[src]
impl<Ctx: Validator> Strong<Ctx>
[src]
pub fn valid(&self) -> Result<&Self, Ctx::Err>
[src]
Re-validates self
pub fn to_strong_buf(&self) -> StrongBuf<Ctx>
[src]
Converts to StrongBuf
.
Trait Implementations
impl<Ctx> Borrow<Strong<Ctx>> for StrongBuf<Ctx> where
Ctx: Validator,
[src]
Ctx: Validator,
impl<Ctx> Debug for Strong<Ctx> where
Ctx: Validator + DebugTransparent,
[src]
Ctx: Validator + DebugTransparent,
impl<Ctx> Display for Strong<Ctx> where
Ctx: Validator + DisplayTransparent,
[src]
Ctx: Validator + DisplayTransparent,
impl<Ctx> Eq for Strong<Ctx> where
Ctx: Validator + PartialEqTransparent + EqTransparent,
[src]
Ctx: Validator + PartialEqTransparent + EqTransparent,
impl<Ctx: HashTransparent> Hash for Strong<Ctx> where
Ctx: Validator,
[src]
Ctx: Validator,
fn hash<H: Hasher>(&self, h: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<Ctx> Ord for Strong<Ctx> where
Ctx: Validator + PartialEqTransparent + EqTransparent + PartialOrdTransparent + OrdTransparent,
[src]
Ctx: Validator + PartialEqTransparent + EqTransparent + PartialOrdTransparent + OrdTransparent,
fn cmp(&self, other: &Strong<Ctx>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<Ctx> PartialEq<Strong<Ctx>> for Strong<Ctx> where
Ctx: Validator + PartialEqTransparent,
[src]
Ctx: Validator + PartialEqTransparent,
fn eq(&self, other: &Strong<Ctx>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<Ctx> PartialOrd<Strong<Ctx>> for Strong<Ctx> where
Ctx: Validator + PartialEqTransparent + PartialOrdTransparent,
[src]
Ctx: Validator + PartialEqTransparent + PartialOrdTransparent,
fn partial_cmp(&self, other: &Strong<Ctx>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<Ctx> ToOwned for Strong<Ctx> where
Ctx: Validator,
[src]
Ctx: Validator,
Auto Trait Implementations
impl<Ctx> RefUnwindSafe for Strong<Ctx> where
Ctx: RefUnwindSafe,
[src]
Ctx: RefUnwindSafe,
impl<Ctx> Send for Strong<Ctx> where
Ctx: Send,
[src]
Ctx: Send,
impl<Ctx> !Sized for Strong<Ctx>
[src]
impl<Ctx> Sync for Strong<Ctx> where
Ctx: Sync,
[src]
Ctx: Sync,
impl<Ctx> Unpin for Strong<Ctx> where
Ctx: Unpin,
[src]
Ctx: Unpin,
impl<Ctx> UnwindSafe for Strong<Ctx> where
Ctx: UnwindSafe,
[src]
Ctx: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,