pub struct NonBlank<T = String>(/* private fields */);Expand description
A string with at least one non-whitespace character, held verbatim. T is any string type:
String, &str, Cow<str>, Box<str>, …
Implementations§
Trait Implementations§
Source§impl<'de, T: AsRef<str> + Deserialize<'de>> Deserialize<'de> for NonBlank<T>
impl<'de, T: AsRef<str> + Deserialize<'de>> Deserialize<'de> for NonBlank<T>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl<T: Eq> Eq for NonBlank<T>
Source§impl<T> JsonSchema for NonBlank<T>
impl<T> JsonSchema for NonBlank<T>
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§fn json_schema(_: &mut SchemaGenerator) -> Schema
fn json_schema(_: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§impl<T: Ord> Ord for NonBlank<T>
impl<T: Ord> Ord for NonBlank<T>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<T: PartialOrd> PartialOrd for NonBlank<T>
impl<T: PartialOrd> PartialOrd for NonBlank<T>
impl<T: PartialEq> StructuralPartialEq for NonBlank<T>
Auto Trait Implementations§
impl<T> Freeze for NonBlank<T>where
T: Freeze,
impl<T> RefUnwindSafe for NonBlank<T>where
T: RefUnwindSafe,
impl<T> Send for NonBlank<T>where
T: Send,
impl<T> Sync for NonBlank<T>where
T: Sync,
impl<T> Unpin for NonBlank<T>where
T: Unpin,
impl<T> UnsafeUnpin for NonBlank<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for NonBlank<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
Source§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
Source§fn cast_approx(self) -> T
fn cast_approx(self) -> T
Source§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
Source§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
Source§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
Source§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> DisplayRichExt for T
impl<T> DisplayRichExt for T
Source§fn display_rich(&self) -> RichDisplay<'_>
fn display_rich(&self) -> RichDisplay<'_>
Returns a
RichDisplay builder for this path.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> EscapeNonPrintablePosixExt for T
impl<T> EscapeNonPrintablePosixExt for T
fn escape_non_printable(&self) -> Cow<'_, str>
impl<T> Formattable for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> NormalizeDiacriticsExt for T
impl<T> NormalizeDiacriticsExt for T
Source§fn normalize_diacritics(&self) -> Cow<'_, str>
fn normalize_diacritics(&self) -> Cow<'_, str>
Normalize Latin diacritics to their ASCII equivalents (
é -> e).impl<T> Parsable for T
Source§impl<P> PathExt for P
impl<P> PathExt for P
Source§fn is_dangling_symlink(&self) -> bool
fn is_dangling_symlink(&self) -> bool
Check whether the given path is a symlink, and a dangling one at that.
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)