[][src]Enum places::storage::tags::ValidatedTag

pub enum ValidatedTag<'a> {
    Invalid(&'a str),
    Normalized(&'a str),
    Original(&'a str),
}

The validity of a tag.

Variants

Invalid(&'a str)

The tag is invalid.

Normalized(&'a str)

The tag is valid, but normalized to remove leading and trailing whitespace.

Original(&'a str)

The original tag is valid.

Implementations

impl<'a> ValidatedTag<'a>[src]

pub fn is_original(&self) -> bool[src]

Returns true if the original tag is valid; false if it's invalid or normalized.

pub fn ensure_valid(&self) -> Result<&'a str>[src]

Returns the tag string if the tag is valid or normalized, or an error if the tag is invalid.

Trait Implementations

impl<'a> Clone for ValidatedTag<'a>[src]

impl<'a> Copy for ValidatedTag<'a>[src]

impl<'a> Debug for ValidatedTag<'a>[src]

impl<'a> Eq for ValidatedTag<'a>[src]

impl<'a> PartialEq<ValidatedTag<'a>> for ValidatedTag<'a>[src]

impl<'a> StructuralEq for ValidatedTag<'a>[src]

impl<'a> StructuralPartialEq for ValidatedTag<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for ValidatedTag<'a>

impl<'a> Send for ValidatedTag<'a>

impl<'a> Sync for ValidatedTag<'a>

impl<'a> Unpin for ValidatedTag<'a>

impl<'a> UnwindSafe for ValidatedTag<'a>

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, 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,