Struct strong::Strong[][src]

#[repr(transparent)]pub struct Strong<Ctx: Validator> { /* fields omitted */ }

Strongly typed str

Implementations

impl<Ctx: Validator> Strong<Ctx>[src]

pub fn validate<S: AsRef<str> + ?Sized>(s: &S) -> Result<&Self, Ctx::Err>[src]

construct from str.

pub unsafe fn without_validate<S: AsRef<str> + ?Sized>(s: &S) -> &Self[src]

pub fn as_str(&self) -> &str[src]

convert to str.

pub fn to_strong_buf(&self) -> StrongBuf<Ctx>[src]

pub fn as_bytes(&self) -> &[u8][src]

Trait Implementations

impl<Ctx: Validator> Borrow<Strong<Ctx>> for StrongBuf<Ctx>[src]

impl<Ctx: Validator> ToOwned for Strong<Ctx>[src]

type Owned = StrongBuf<Ctx>

The resulting type after obtaining ownership.

Auto Trait Implementations

impl<Ctx> RefUnwindSafe for Strong<Ctx> where
    Ctx: RefUnwindSafe
[src]

impl<Ctx> Send for Strong<Ctx> where
    Ctx: Send
[src]

impl<Ctx> !Sized for Strong<Ctx>[src]

impl<Ctx> Sync for Strong<Ctx> where
    Ctx: Sync
[src]

impl<Ctx> Unpin for Strong<Ctx> where
    Ctx: Unpin
[src]

impl<Ctx> UnwindSafe for Strong<Ctx> where
    Ctx: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.