Skip to main content

DialetoError

Enum DialetoError 

Source
pub enum DialetoError {
    Vazio,
    NaoEhLista,
    CabecaErrada {
        encontrado: String,
    },
    Leitura(String),
}
Expand description

A source that is not a (defcaixa …) / (defmolde …) form at all.

Variants§

§

Vazio

§

NaoEhLista

§

CabecaErrada

Fields

§encontrado: String
§

Leitura(String)

Implementations§

Source§

impl DialetoError

Source

pub fn cabeca_errada(encontrado: &str) -> Self

Construct a DialetoError::CabecaErrada naming the offending head symbol found at the top-level form.

Substrate primitive every classify_form wrong-head fallthrough wire-up site now routes through, folding the pre-lift uniform three-line Self::CabecaErrada { encontrado: <head>.to_string() } one-field struct-literal onto one substrate primitive matching the peer LimitsError::unknown_byte_unit(unit: &str) / LimitsError::unknown_duration_unit(unit: &str) (limits_codec_unit_only_ctors! — 29fac09) single-slot discipline on the sibling one-field { <field>: String } envelope axis, and matching the peer ManifestError::code_path_empty / BehaviorError::empty_path / UpgradeError::duplicate_from / AplicacaoError::placement_cluster_duplicate (94dabc8 / 0e33b37 / 7e52aec / 92b1c92) single-slot inherent-ctor discipline every sibling { <field>: <T> } error-envelope variant on caixa-core’s error surface now carries.

The one open-coded wire-up site — classify_form’s wrong-head fallthrough arm on the head: &str binding read from the top-level form via tatara_lisp::Sexp::as_symbol — opened the identical three-line Self::CabecaErrada { encontrado: <head>.to_string() } block against the codec-scoped <head>: &str binding. Now routes through DialetoError::cabeca_errada(head), byte-equal to the pre-lift struct-literal on the same &str fixture, so any future widening of the diagnostic shape (e.g. carrying the source-file path alongside the head symbol, carrying the head symbol’s position offset for an authoring-surface caret pointer) lands at exactly one dispatch on the substrate primitive rather than re- inlining the struct-literal at every wrong-head fallthrough consumer.

Source

pub fn leitura(reason: impl Into<String>) -> Self

Construct a DialetoError::Leitura carrying the offending tatara-lisp reader-error message reason verbatim in the variant’s tuple-newtype payload.

Substrate primitive every classify tatara-lisp-reader map-err wire-up site now routes through, folding the pre-lift uniform Self::Leitura(<into-String-expr>) tuple-newtype construction onto one substrate primitive matching the peer LimitsError::empty_byte_size / LimitsError::empty_duration (7a4b003 / 319216c) (String) single-slot tuple-newtype discipline on the sibling crate::limits::LimitsError envelope’s empty-shape axis of the paired codec-magnitude family. Peer to the sibling DialetoError::cabeca_errada ctor on the same envelope’s wrong-head axis but on the tatara-lisp-reader axis rather than the classifier-fallthrough axis. Closes the last un-lifted variant on DialetoError — every one of the sole wire-up sites (the classify tatara-lisp-reader .map_err(|e| Self::Leitura(e.to_string())) arm) opened the identical DialetoError::Leitura(<into-String-expr>) block against the codec-scoped String (e.to_string()) binding, so the fold routes the site through one dispatch on a uniform impl Into<String> param, byte-equal to the pre-lift tuple-newtype construction on the same argument.

The impl Into<String> bound covers both wire-up shapes on classify — a String binding (e.to_string() on the [tatara_lisp::Error]-carrying e binding) and a &str binding (a future admission-webhook consumer probing a caller-scoped &'static str fixture, a future feira lint --tatara-reader-round-trip verb sweeping every tatara_lisp::read return through the same shape gate) — without forcing the caller to spell the conversion at the wire-up site. Same shape the peer crate::limits::LimitsError::empty_byte_size / crate::limits::LimitsError::empty_duration / crate::limits::LimitsError::bad_millicores / crate::limits::LimitsError::bad_byte_magnitude / crate::limits::LimitsError::bad_duration_magnitude folds carry on the peer bad-magnitude and empty-shape axes of the same paired (String) tuple-newtype codec-magnitude family. #[must_use] fires a compile warning at any wire-up that mistakenly discards the constructed error.

Every future consumer that wants to construct this variant outside classify (a deferred feira lint --tatara-reader- round-trip per-caixa admission verb probing each authored manifest against the tatara-lisp-reader shape gate, an M4 typed mesh.pleme.io/v1alpha1/Servico CR materializer’s per-manifest admission validator re-checking one edited caixa.lisp against the reader floor, a per-caixa.lisp value-shape pre-emitter probing each declared manifest ahead of the operator’s admit-cycle) now reaches the variant through one call rather than re-inlining the tuple-newtype block in lockstep with the pre-existing wire-up.

Trait Implementations§

Source§

impl Clone for DialetoError

Source§

fn clone(&self) -> DialetoError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DialetoError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for DialetoError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for DialetoError

Source§

impl Error for DialetoError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<DialetoError> for LeituraError

Source§

fn from(source: DialetoError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for DialetoError

Source§

fn eq(&self, other: &DialetoError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DialetoError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.