Struct strong::StrongBuf[][src]

pub struct StrongBuf<Ctx: Validator> { /* fields omitted */ }

Strongly typed String

Implementations

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

pub fn validate(s: String) -> Result<Self, Ctx::Err>[src]

Constructs from String.

pub unsafe fn without_validate(s: String) -> Self[src]

pub fn valid(self) -> Result<Self, Ctx::Err>[src]

Re-validates self

pub fn into_string(self) -> String[src]

Converts to String.

pub fn as_strong(&self) -> &Strong<Ctx>[src]

Methods from Deref<Target = Strong<Ctx>>

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 + CloneTransparent> Clone for StrongBuf<Ctx>[src]

Implements Clone only if Validator has Clone.

fn clone(&self) -> Self[src]

Panics

Panics if Validator rejects cloned string.

impl<Ctx: Validator + DebugTransparent> Debug for StrongBuf<Ctx>[src]

impl<Ctx: Validator + DefaultTransparent> Default for StrongBuf<Ctx>[src]

Implements Default only if Validator has Default.

fn default() -> Self[src]

Panics

Panics if Validator rejects blank string.

impl<Ctx: Validator> Deref for StrongBuf<Ctx>[src]

type Target = Strong<Ctx>

The resulting type after dereferencing.

impl<Ctx: Validator + DisplayTransparent> Display for StrongBuf<Ctx>[src]

impl<Ctx: Validator + PartialEqTransparent + EqTransparent> Eq for StrongBuf<Ctx>[src]

impl<Ctx: Validator + HashTransparent> Hash for StrongBuf<Ctx>[src]

impl<Ctx: Validator + PartialEqTransparent + EqTransparent + PartialOrdTransparent + OrdTransparent> Ord for StrongBuf<Ctx>[src]

impl<Ctx: Validator + PartialEqTransparent> PartialEq<StrongBuf<Ctx>> for StrongBuf<Ctx>[src]

impl<Ctx: Validator + PartialEqTransparent + PartialOrdTransparent> PartialOrd<StrongBuf<Ctx>> for StrongBuf<Ctx>[src]

Auto Trait Implementations

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

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

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

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

impl<Ctx> UnwindSafe for StrongBuf<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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.