pub enum DTypeParseError {
Unknown(String),
Reserved(String),
}Expand description
Error returned when a string cannot be parsed as a DType.
§Why this distinguishes two rejections
f8e5m2fnuz is a real, specified layout this schema version declines to
compute on; asdf is not a dtype at all. Those are different facts about
the world, and they imply different actions — wait for a schema bump vs
fix your input. Collapsing them tells a caller “no” without telling it
which no.
The distinction is a VARIANT, not a message. A differing Display
string is prose a caller cannot act on; the obligation is to a caller of
this API, so it has to be matchable.
For what this does and does not discharge — in particular that it is NOT
KISS-CLASSIFY §6.1-0001 conformance, because that clause binds a reader of
a structure_key and Fuel has none — and for the scheduled external expiry
this decline carries, see RESERVED_DTYPE_TOKENS.
Variants§
Unknown(String)
Not a §6.1 dtype token at all.
Reserved(String)
A §6.1 token that is reserved at this schema version: recognized, deliberately not computed on.
Implementations§
Trait Implementations§
Source§impl Debug for DTypeParseError
impl Debug for DTypeParseError
Source§impl Display for DTypeParseError
impl Display for DTypeParseError
impl Eq for DTypeParseError
Source§impl Error for DTypeParseError
impl Error for DTypeParseError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for DTypeParseError
impl PartialEq for DTypeParseError
impl StructuralPartialEq for DTypeParseError
Auto Trait Implementations§
impl Freeze for DTypeParseError
impl RefUnwindSafe for DTypeParseError
impl Send for DTypeParseError
impl Sync for DTypeParseError
impl Unpin for DTypeParseError
impl UnsafeUnpin for DTypeParseError
impl UnwindSafe for DTypeParseError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more