Struct erg_parser::error::IncompleteArtifact

source ·
pub struct IncompleteArtifact<A = Module, Es = ParseErrors> {
    pub ast: Option<A>,
    pub warns: Es,
    pub errors: Es,
}

Fields§

§ast: Option<A>§warns: Es§errors: Es

Implementations§

source§

impl<A, Es> IncompleteArtifact<A, Es>

source

pub fn new(ast: Option<A>, warns: Es, errors: Es) -> Self

source

pub fn map_errs<U>(self, f: impl Fn(Es) -> U) -> IncompleteArtifact<A, U>

source

pub fn map_mod<U>(self, f: impl FnOnce(A) -> U) -> IncompleteArtifact<U, Es>

Trait Implementations§

source§

impl<A: Debug, Es: Debug> Debug for IncompleteArtifact<A, Es>

source§

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

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

impl<A> From<LexErrors> for IncompleteArtifact<A, ParseErrors>

source§

fn from(value: LexErrors) -> IncompleteArtifact<A, ParseErrors>

Converts to this type from the input type.
source§

impl<A> From<ParserRunnerErrors> for IncompleteArtifact<A, ParserRunnerErrors>

source§

fn from(value: ParserRunnerErrors) -> IncompleteArtifact<A, ParserRunnerErrors>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<A, Es> Freeze for IncompleteArtifact<A, Es>
where Es: Freeze, A: Freeze,

§

impl<A, Es> RefUnwindSafe for IncompleteArtifact<A, Es>

§

impl<A, Es> Send for IncompleteArtifact<A, Es>
where Es: Send, A: Send,

§

impl<A, Es> Sync for IncompleteArtifact<A, Es>
where Es: Sync, A: Sync,

§

impl<A, Es> Unpin for IncompleteArtifact<A, Es>
where Es: Unpin, A: Unpin,

§

impl<A, Es> UnwindSafe for IncompleteArtifact<A, Es>
where Es: UnwindSafe, A: UnwindSafe,

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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

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>,

§

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.