Struct snake_case::SnakeCaseRef[][src]

pub struct SnakeCaseRef<'a>(_);

An non-owning string type that can only refer to string containing valid snake_case. In other words, it always matches ^[_a-z][_a-z0-9]*$

  • Non-empty
  • Starts with a lower case ASCII letter or underscore
  • Contains only lower case ASCII letters, underscores and digits

Implementations

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

pub const fn try_from_str(s: &str) -> Result<SnakeCaseRef<'_>, InvalidSnakeCase>[src]

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

pub fn to_owned(&self) -> SnakeCase[src]

Trait Implementations

impl Borrow<str> for SnakeCaseRef<'_>[src]

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

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

impl Debug for SnakeCaseRef<'_>[src]

impl Display for SnakeCaseRef<'_>[src]

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

impl<'a> Hash for SnakeCaseRef<'a>[src]

impl<'a> Ord for SnakeCaseRef<'a>[src]

impl PartialEq<&'_ str> for SnakeCaseRef<'_>[src]

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

impl PartialEq<String> for SnakeCaseRef<'_>[src]

impl PartialEq<str> for SnakeCaseRef<'_>[src]

impl<'a> PartialOrd<SnakeCaseRef<'a>> for SnakeCaseRef<'a>[src]

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

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

impl<'a> TryFrom<&'a str> for SnakeCaseRef<'a>[src]

type Error = InvalidSnakeCase

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<'a> RefUnwindSafe for SnakeCaseRef<'a>

impl<'a> Send for SnakeCaseRef<'a>

impl<'a> Sync for SnakeCaseRef<'a>

impl<'a> Unpin for SnakeCaseRef<'a>

impl<'a> UnwindSafe for SnakeCaseRef<'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> 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.