pub struct GString<V: Validator = NoValidation, const MIN: usize = DEFAULT_MIN, const MAX: usize = DEFAULT_MAX, const ASCII_ONLY: bool = DEFAULT_ASCII_ONLY> { /* private fields */ }Expand description
GString contains stack-allocated, Copy, bounded string along with ASCII toggle and embedded validation logic.
§Generic parameters:
V: Validator: default toNoValidation, it will validate the string upon creation and deserialization.const MIN: usize: default toDEFAULT_MIN, in bytes, determine minimum length.const MAX: usize: default toDEFAULT_MAX, in bytes, determine maximum length.const ASCII_ONLY: bool: default toDEFAULT_ASCII_ONLY, determine whether GString may contains arbitrary or ASCII only UTF-8 encoded string.
§Usage
You can use this type in several ways:
- Defaulted to default generic params:
let a: GString = GString::try_new("anjay!!").unwrap(). - Defaulted to default generic params with
try_default(...):let a = GString::try_default("anjay!!").unwrap(). - Using type aliases. You can declare some aliases matching the behavior you want:
type Username = GString<UsernameValidation, 3, 20, true>. - Declaring each generic params from left to right. Declaration must be from left to right with omission allowed on right-most params:
let a = GString::<(), 2>::try_new("anjay!!").unwrap().
§Examples
use g_string::{GString, Validator, GStringError};
let a: GString = GString::try_new("anjay!!").unwrap();
assert_eq!(a, "anjay!!");
let a = GString::try_default("anjay!!").unwrap();
assert_eq!(a, "anjay!!");
#[derive(Debug, Clone)]
struct UsernameValidation;
impl Validator for UsernameValidation {
type Err = GStringError<&'static str>;
fn validate(_: impl AsRef<str>) -> Result<(), Self::Err> {
// some validation logics here...
Ok(())
}
}
type Username = GString<UsernameValidation, 3, 20, true>;
let a = Username::try_new("wanjay!!🤣");
assert!(a.is_err()); // because '🤣' is not ASCII.
let a = GString::<(), 2, 4>::try_new("anjay!!");
assert!(a.is_err()); // MAX is 4.Implementations§
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
Sourcepub fn try_from_iter<I, S>(iter: I) -> Result<Self, GStringError<V::Err>>
pub fn try_from_iter<I, S>(iter: I) -> Result<Self, GStringError<V::Err>>
Construct GString from iterator of AsRef<str>.
§Examples
use g_string::GString;
let result: GString = GString::try_from_iter(["12", "3a"]).unwrap();
assert_eq!(result, "123a");Sourcepub fn try_from_chars<I>(iter: I) -> Result<Self, GStringError<V::Err>>where
I: IntoIterator<Item = char>,
pub fn try_from_chars<I>(iter: I) -> Result<Self, GStringError<V::Err>>where
I: IntoIterator<Item = char>,
Construct GString from iterator of chars
§Examples
use g_string::GString;
let result: GString = GString::try_from_chars(['a', 'b', 'c']).unwrap();
assert_eq!(result, "abc");Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
Sourcepub fn push(&mut self, ch: char) -> Result<(), GStringError<V::Err>>
pub fn push(&mut self, ch: char) -> Result<(), GStringError<V::Err>>
Push a char at the end of string with invariants preserved.
Sourcepub fn push_str(&mut self, s: &str) -> Result<(), GStringError<V::Err>>
pub fn push_str(&mut self, s: &str) -> Result<(), GStringError<V::Err>>
Push string at the end of string with invariants preserved.
Sourcepub fn insert(
&mut self,
idx: usize,
ch: char,
) -> Result<(), GStringError<V::Err>>
pub fn insert( &mut self, idx: usize, ch: char, ) -> Result<(), GStringError<V::Err>>
Insert a char at specific index with invariants preserved.
Sourcepub fn insert_str(
&mut self,
idx: usize,
string: &str,
) -> Result<(), GStringError<V::Err>>
pub fn insert_str( &mut self, idx: usize, string: &str, ) -> Result<(), GStringError<V::Err>>
Insert string at specific index with invariants preserved.
Sourcepub fn pop(&mut self) -> Result<Option<char>, GStringError<V::Err>>
pub fn pop(&mut self) -> Result<Option<char>, GStringError<V::Err>>
Pop a char from the end of string with invariants preserved.
Sourcepub fn remove(&mut self, idx: usize) -> Result<char, GStringError<V::Err>>
pub fn remove(&mut self, idx: usize) -> Result<char, GStringError<V::Err>>
Removes a char at specific index with invariants preserved.
Sourcepub fn truncate(&mut self, new_len: usize) -> Result<(), GStringError<V::Err>>
pub fn truncate(&mut self, new_len: usize) -> Result<(), GStringError<V::Err>>
Truncates to a new length with invariants preserved.
Sourcepub fn replace(
&mut self,
from: &str,
to: &str,
) -> Result<(), GStringError<V::Err>>
pub fn replace( &mut self, from: &str, to: &str, ) -> Result<(), GStringError<V::Err>>
Replaces from with to in string with invariants preserved.
Sourcepub fn replace_range<R>(
&mut self,
range: R,
replace_with: &str,
) -> Result<(), GStringError<V::Err>>where
R: RangeBounds<usize>,
pub fn replace_range<R>(
&mut self,
range: R,
replace_with: &str,
) -> Result<(), GStringError<V::Err>>where
R: RangeBounds<usize>,
Replaces with range with invariants preserved.
Source§impl<V: Validator + AllowEmpty, const MAX: usize, const ASCII_ONLY: bool> GString<V, 0, MAX, ASCII_ONLY>
impl<V: Validator + AllowEmpty, const MAX: usize, const ASCII_ONLY: bool> GString<V, 0, MAX, ASCII_ONLY>
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
Sourcepub fn try_extend<I, S>(&mut self, iter: I) -> Result<(), GStringError<V::Err>>
pub fn try_extend<I, S>(&mut self, iter: I) -> Result<(), GStringError<V::Err>>
Extend existing string with iterator of AsRef<str> with invariants preserved.
§Examples
use g_string::GString;
let mut gs: GString<(), 0, 100, false> = GString::try_new("hello").unwrap();
gs.try_extend(["123", "456"].iter().copied());
assert_eq!(gs.as_str(), "hello123456");Sourcepub fn try_extend_chars<I>(
&mut self,
iter: I,
) -> Result<(), GStringError<V::Err>>where
I: IntoIterator<Item = char>,
pub fn try_extend_chars<I>(
&mut self,
iter: I,
) -> Result<(), GStringError<V::Err>>where
I: IntoIterator<Item = char>,
Extend existing string with iterator of chars with invariants preserved.
§Examples
use g_string::GString;
let mut gs: GString<(), 0, 100, false> = GString::try_new("hello").unwrap();
gs.try_extend_chars(['@', 'z'].iter().copied());
assert_eq!(gs.as_str(), "hello@z");Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
pub const fn is_char_boundary(&self, index: usize) -> bool
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
Sourcepub fn char_indices(&self) -> CharIndices<'_>
pub fn char_indices(&self) -> CharIndices<'_>
Returns an iterator over the chars of a string slice, and their positions.
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
pub fn contains<P>(&self, pat: P) -> boolwhere
P: Pattern,
pub fn starts_with<P>(&self, pat: P) -> boolwhere
P: Pattern,
pub fn ends_with<P>(&self, pat: P) -> boolwhere
P: Pattern,
pub fn find<P>(&self, pat: P) -> Option<usize>where
P: Pattern,
pub fn rfind<P>(&self, pat: P) -> Option<usize>where
P: Pattern,
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
pub fn get<I>(&self, i: I) -> Option<&<I as SliceIndex<str>>::Output>where
I: SliceIndex<str>,
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
Sourcepub fn split<P: Pattern>(&self, pat: P) -> P::SplitIter<'_>
pub fn split<P: Pattern>(&self, pat: P) -> P::SplitIter<'_>
Returns an iterator over substrings of this string slice, separated by characters matched by a pattern.
Sourcepub fn split_whitespace(&self) -> SplitWhitespace<'_>
pub fn split_whitespace(&self) -> SplitWhitespace<'_>
Returns an iterator over the non-whitespace substrings of this string slice, separated by any amount of whitespace.
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
Sourcepub fn try_trim(&self) -> Result<Self, GStringError<V::Err>>
pub fn try_trim(&self) -> Result<Self, GStringError<V::Err>>
Returns a trimmed copy of this string.
Sourcepub fn try_trim_start(&self) -> Result<Self, GStringError<V::Err>>
pub fn try_trim_start(&self) -> Result<Self, GStringError<V::Err>>
Returns a copy of this string with leading whitespace removed.
Sourcepub fn try_trim_end(&self) -> Result<Self, GStringError<V::Err>>
pub fn try_trim_end(&self) -> Result<Self, GStringError<V::Err>>
Returns a copy of this string with trailing whitespace removed.
Sourcepub fn strip_prefix<P: Pattern>(&self, prefix: P) -> Option<&str>
pub fn strip_prefix<P: Pattern>(&self, prefix: P) -> Option<&str>
Returns a string slice with the given prefix removed.
Sourcepub fn strip_suffix<P: Pattern>(&self, suffix: P) -> Option<&str>
pub fn strip_suffix<P: Pattern>(&self, suffix: P) -> Option<&str>
Returns a string slice with the given suffix removed.
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
Sourcepub fn matches<P: Pattern>(&self, pat: P) -> P::MatchesIter<'_>
pub fn matches<P: Pattern>(&self, pat: P) -> P::MatchesIter<'_>
Returns an iterator over matches of a pattern within this string slice.
Sourcepub fn rmatches<P: Pattern>(&self, pat: P) -> P::RMatchesIter<'_>
pub fn rmatches<P: Pattern>(&self, pat: P) -> P::RMatchesIter<'_>
Returns an iterator over matches of a pattern within this string slice, yielded in reverse order.
Sourcepub fn match_indices<P: Pattern>(&self, pat: P) -> P::MatchIndicesIter<'_>
pub fn match_indices<P: Pattern>(&self, pat: P) -> P::MatchIndicesIter<'_>
Returns an iterator over the disjoint matches of a pattern and their positions within this string slice.
Sourcepub fn rmatch_indices<P: Pattern>(&self, pat: P) -> P::RMatchIndicesIter<'_>
pub fn rmatch_indices<P: Pattern>(&self, pat: P) -> P::RMatchIndicesIter<'_>
Returns an iterator over the disjoint matches of a pattern and their positions within this string slice, yielded in reverse order.
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
Sourcepub fn parse<F>(&self) -> Result<F, F::Err>where
F: FromStr,
pub fn parse<F>(&self) -> Result<F, F::Err>where
F: FromStr,
Parses this string slice into another type.
Sourcepub fn is_ascii(&self) -> bool
pub fn is_ascii(&self) -> bool
Checks if all characters in this string are within the ASCII range.
Sourcepub fn eq_ignore_ascii_case(&self, other: &str) -> bool
pub fn eq_ignore_ascii_case(&self, other: &str) -> bool
Compares two strings in a case-insensitive ASCII manner.
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
Sourcepub fn escape_debug(&self) -> EscapeDebug<'_>
pub fn escape_debug(&self) -> EscapeDebug<'_>
Returns an iterator that escapes this string using char::escape_debug.
Sourcepub fn escape_default(&self) -> EscapeDefault<'_>
pub fn escape_default(&self) -> EscapeDefault<'_>
Returns an iterator that escapes this string using
char::escape_default.
Sourcepub fn escape_unicode(&self) -> EscapeUnicode<'_>
pub fn escape_unicode(&self) -> EscapeUnicode<'_>
Returns an iterator that escapes this string using
char::escape_unicode.
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
Sourcepub fn encode_utf16(&self) -> EncodeUtf16<'_>
pub fn encode_utf16(&self) -> EncodeUtf16<'_>
Returns an iterator of UTF-16 code units for this string slice.
Source§impl GString
impl GString
Sourcepub fn try_default<S>(s: S) -> Result<Self, GStringError<Infallible>>
pub fn try_default<S>(s: S) -> Result<Self, GStringError<Infallible>>
Construct with default generic params.
§Examples
use g_string::GString;
let a = GString::try_default("anjay!!").unwrap();
assert_eq!(a, "anjay!!");Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> GString<V, MIN, MAX, ASCII_ONLY>
Sourcepub fn try_new<S>(s: S) -> Result<Self, GStringError<V::Err>>
pub fn try_new<S>(s: S) -> Result<Self, GStringError<V::Err>>
Construct new GString. All invariants from generic params will be imposed here.
§Examples
use g_string::GString;
let a: GString = GString::try_new("anjay!!").unwrap();
assert_eq!(a, "anjay!!");pub fn validate(self) -> Result<Self, GStringError<V::Err>>
Trait Implementations§
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> AsRef<[u8]> for GString<V, MIN, MAX, ASCII_ONLY>
GString AS &[u8]
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> AsRef<[u8]> for GString<V, MIN, MAX, ASCII_ONLY>
GString AS &[u8]
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> AsRef<str> for GString<V, MIN, MAX, ASCII_ONLY>
GString AS &str
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> AsRef<str> for GString<V, MIN, MAX, ASCII_ONLY>
GString AS &str
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Borrow<str> for GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Borrow<str> for GString<V, MIN, MAX, ASCII_ONLY>
Source§impl<V: Clone + Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Clone for GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Clone + Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Clone for GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Copy + Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Copy for GString<V, MIN, MAX, ASCII_ONLY>
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Debug for GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Debug for GString<V, MIN, MAX, ASCII_ONLY>
Source§impl<V: Validator + AllowEmpty, const MAX: usize, const ASCII_ONLY: bool> Default for GString<V, 0, MAX, ASCII_ONLY>
impl<V: Validator + AllowEmpty, const MAX: usize, const ASCII_ONLY: bool> Default for GString<V, 0, MAX, ASCII_ONLY>
Source§impl<'de, V, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Deserialize<'de> for GString<V, MIN, MAX, ASCII_ONLY>
impl<'de, V, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Deserialize<'de> for GString<V, MIN, MAX, ASCII_ONLY>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Display for GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Display for GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Eq + Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Eq for GString<V, MIN, MAX, ASCII_ONLY>
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> From<GString<V, MIN, MAX, ASCII_ONLY>> for String
Available on crate feature alloc only.GString -> String
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> From<GString<V, MIN, MAX, ASCII_ONLY>> for String
alloc only.GString -> String
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> FromStr for GString<V, MIN, MAX, ASCII_ONLY>
&str -> GString
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> FromStr for GString<V, MIN, MAX, ASCII_ONLY>
&str -> GString
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Hash for GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Hash for GString<V, MIN, MAX, ASCII_ONLY>
Source§impl<'a, V, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> IntoIterator for &'a GString<V, MIN, MAX, ASCII_ONLY>where
V: Validator,
Iterates over the characters of a borrowed GString.
impl<'a, V, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> IntoIterator for &'a GString<V, MIN, MAX, ASCII_ONLY>where
V: Validator,
Iterates over the characters of a borrowed GString.
Source§impl<'a, V, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> IntoIterator for &'a mut GString<V, MIN, MAX, ASCII_ONLY>where
V: Validator,
Iterates over the characters of a mutably borrowed GString.
impl<'a, V, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> IntoIterator for &'a mut GString<V, MIN, MAX, ASCII_ONLY>where
V: Validator,
Iterates over the characters of a mutably borrowed GString.
Source§impl<V, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> IntoIterator for GString<V, MIN, MAX, ASCII_ONLY>where
V: Validator,
Iterates over the characters of an owned GString.
impl<V, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> IntoIterator for GString<V, MIN, MAX, ASCII_ONLY>where
V: Validator,
Iterates over the characters of an owned GString.
Source§impl<V: Validator + Eq, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Ord for GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator + Eq, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Ord for GString<V, MIN, MAX, ASCII_ONLY>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialEq<&str> for GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialEq<&str> for GString<V, MIN, MAX, ASCII_ONLY>
Source§impl<LHSV: Validator, RHSV: Validator, const LMIN: usize, const LMAX: usize, const LASCII: bool, const RMIN: usize, const RMAX: usize, const RASCII: bool> PartialEq<GString<RHSV, RMIN, RMAX, RASCII>> for GString<LHSV, LMIN, LMAX, LASCII>
impl<LHSV: Validator, RHSV: Validator, const LMIN: usize, const LMAX: usize, const LASCII: bool, const RMIN: usize, const RMAX: usize, const RASCII: bool> PartialEq<GString<RHSV, RMIN, RMAX, RASCII>> for GString<LHSV, LMIN, LMAX, LASCII>
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialEq<GString<V, MIN, MAX, ASCII_ONLY>> for &str
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialEq<GString<V, MIN, MAX, ASCII_ONLY>> for &str
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialEq<GString<V, MIN, MAX, ASCII_ONLY>> for String
Available on crate feature alloc only.
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialEq<GString<V, MIN, MAX, ASCII_ONLY>> for String
alloc only.Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialEq<GString<V, MIN, MAX, ASCII_ONLY>> for str
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialEq<GString<V, MIN, MAX, ASCII_ONLY>> for str
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialEq<String> for GString<V, MIN, MAX, ASCII_ONLY>
Available on crate feature alloc only.
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialEq<String> for GString<V, MIN, MAX, ASCII_ONLY>
alloc only.Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialEq<str> for GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialEq<str> for GString<V, MIN, MAX, ASCII_ONLY>
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialOrd<&str> for GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialOrd<&str> for GString<V, MIN, MAX, ASCII_ONLY>
Source§impl<LHSV: Validator, RHSV: Validator, const LMIN: usize, const LMAX: usize, const LASCII: bool, const RMIN: usize, const RMAX: usize, const RASCII: bool> PartialOrd<GString<RHSV, RMIN, RMAX, RASCII>> for GString<LHSV, LMIN, LMAX, LASCII>
impl<LHSV: Validator, RHSV: Validator, const LMIN: usize, const LMAX: usize, const LASCII: bool, const RMIN: usize, const RMAX: usize, const RASCII: bool> PartialOrd<GString<RHSV, RMIN, RMAX, RASCII>> for GString<LHSV, LMIN, LMAX, LASCII>
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialOrd<GString<V, MIN, MAX, ASCII_ONLY>> for &str
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialOrd<GString<V, MIN, MAX, ASCII_ONLY>> for &str
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialOrd<GString<V, MIN, MAX, ASCII_ONLY>> for String
Available on crate feature alloc only.
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialOrd<GString<V, MIN, MAX, ASCII_ONLY>> for String
alloc only.Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialOrd<GString<V, MIN, MAX, ASCII_ONLY>> for str
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialOrd<GString<V, MIN, MAX, ASCII_ONLY>> for str
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialOrd<String> for GString<V, MIN, MAX, ASCII_ONLY>
Available on crate feature alloc only.
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialOrd<String> for GString<V, MIN, MAX, ASCII_ONLY>
alloc only.Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialOrd<str> for GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> PartialOrd<str> for GString<V, MIN, MAX, ASCII_ONLY>
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Serialize for GString<V, MIN, MAX, ASCII_ONLY>
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> Serialize for GString<V, MIN, MAX, ASCII_ONLY>
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> TryFrom<&str> for GString<V, MIN, MAX, ASCII_ONLY>
&str -> GString (try_into)
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> TryFrom<&str> for GString<V, MIN, MAX, ASCII_ONLY>
&str -> GString (try_into)
Source§impl<'a, V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> TryFrom<Cow<'a, str>> for GString<V, MIN, MAX, ASCII_ONLY>
Available on crate feature alloc only.
impl<'a, V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> TryFrom<Cow<'a, str>> for GString<V, MIN, MAX, ASCII_ONLY>
alloc only.Source§impl<GSTRINGV: Validator, GSECRETV: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> TryFrom<GString<GSTRINGV, MIN, MAX, ASCII_ONLY>> for GSecret<GSECRETV, MIN, MAX, ASCII_ONLY>
impl<GSTRINGV: Validator, GSECRETV: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> TryFrom<GString<GSTRINGV, MIN, MAX, ASCII_ONLY>> for GSecret<GSECRETV, MIN, MAX, ASCII_ONLY>
Source§impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> TryFrom<String> for GString<V, MIN, MAX, ASCII_ONLY>
Available on crate feature alloc only.String -> GString
impl<V: Validator, const MIN: usize, const MAX: usize, const ASCII_ONLY: bool> TryFrom<String> for GString<V, MIN, MAX, ASCII_ONLY>
alloc only.String -> GString