Struct snake_case::SnakeCaseRef [−][src]
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]
fn clone(&self) -> SnakeCaseRef<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> Ord for SnakeCaseRef<'a>
[src]
fn cmp(&self, other: &SnakeCaseRef<'a>) -> 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 PartialEq<&'_ str> for SnakeCaseRef<'_>
[src]
impl<'a> PartialEq<SnakeCaseRef<'a>> for SnakeCaseRef<'a>
[src]
fn eq(&self, other: &SnakeCaseRef<'a>) -> bool
[src]
fn ne(&self, other: &SnakeCaseRef<'a>) -> bool
[src]
impl PartialEq<String> for SnakeCaseRef<'_>
[src]
impl PartialEq<str> for SnakeCaseRef<'_>
[src]
impl<'a> PartialOrd<SnakeCaseRef<'a>> for SnakeCaseRef<'a>
[src]
fn partial_cmp(&self, other: &SnakeCaseRef<'a>) -> 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<'a> StructuralEq for SnakeCaseRef<'a>
[src]
impl<'a> StructuralPartialEq for SnakeCaseRef<'a>
[src]
impl<'a> TryFrom<&'a str> for SnakeCaseRef<'a>
[src]
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]
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,