Struct snake_case::SnakeCase [−][src]
An owning string type that can only contain 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 SnakeCase
[src]
pub fn try_from_str(s: &str) -> Result<SnakeCase, InvalidSnakeCase>
[src]
pub fn try_from_string(s: String) -> Result<SnakeCase, InvalidSnakeCase>
[src]
pub fn as_str(&self) -> &str
[src]
pub fn as_ref(&self) -> SnakeCaseRef<'_>
[src]
Trait Implementations
impl Borrow<str> for SnakeCase
[src]
impl Clone for SnakeCase
[src]
impl Debug for SnakeCase
[src]
impl Display for SnakeCase
[src]
impl Eq for SnakeCase
[src]
impl Hash for SnakeCase
[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 Ord for SnakeCase
[src]
fn cmp(&self, other: &SnakeCase) -> 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 SnakeCase
[src]
impl PartialEq<SnakeCase> for SnakeCase
[src]
impl PartialEq<String> for SnakeCase
[src]
impl PartialEq<str> for SnakeCase
[src]
impl PartialOrd<SnakeCase> for SnakeCase
[src]
fn partial_cmp(&self, other: &SnakeCase) -> 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 StructuralEq for SnakeCase
[src]
impl StructuralPartialEq for SnakeCase
[src]
impl TryFrom<&'_ str> for SnakeCase
[src]
type Error = InvalidSnakeCase
The type returned in the event of a conversion error.
fn try_from(s: &str) -> Result<Self, Self::Error>
[src]
impl TryFrom<String> for SnakeCase
[src]
Auto Trait Implementations
impl RefUnwindSafe for SnakeCase
impl Send for SnakeCase
impl Sync for SnakeCase
impl Unpin for SnakeCase
impl UnwindSafe for SnakeCase
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>,