erg_compiler::error

Struct CompileErrors

Source
pub struct CompileErrors(/* private fields */);

Implementations§

Source§

impl CompileErrors

Source

pub const fn new(v: Vec<CompileError>) -> CompileErrors

Source

pub const fn empty() -> CompileErrors

Source

pub fn with_capacity(capacity: usize) -> CompileErrors

Source§

impl CompileErrors

Source

pub fn iter(&self) -> Iter<'_, CompileError>

Source

pub fn iter_mut(&mut self) -> IterMut<'_, CompileError>

Source§

impl CompileErrors

Source

pub fn flush(&mut self) -> Self

Source

pub fn take(&mut self) -> Self

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Trait Implementations§

Source§

impl Clone for CompileErrors

Source§

fn clone(&self) -> CompileErrors

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for CompileErrors

Source§

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

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

impl Default for CompileErrors

Source§

fn default() -> CompileErrors

Returns the “default value” for a type. Read more
Source§

impl Display for CompileErrors

Source§

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

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

impl Error for CompileErrors

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<CompileError> for CompileErrors

Source§

fn from(err: CompileError) -> Self

Converts to this type from the input type.
Source§

impl From<CompileErrors> for ErrorArtifact

Source§

fn from(errors: CompileErrors) -> Self

Converts to this type from the input type.
Source§

impl From<CompileErrors> for ParseErrors

Source§

fn from(err: CompileErrors) -> Self

Converts to this type from the input type.
Source§

impl From<CompileErrors> for ParserRunnerErrors

Source§

fn from(err: CompileErrors) -> Self

Converts to this type from the input type.
Source§

impl From<CompileErrors> for Vec<CompileError>

Source§

fn from(item: CompileErrors) -> Vec<CompileError>

Converts to this type from the input type.
Source§

impl From<Error> for CompileErrors

Source§

fn from(value: Error) -> Self

Converts to this type from the input type.
Source§

impl From<ParserRunnerErrors> for CompileErrors

Source§

fn from(err: ParserRunnerErrors) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<CompileError>> for CompileErrors

Source§

fn from(errs: Vec<CompileError>) -> Self

Converts to this type from the input type.
Source§

impl FromIterator<CompileError> for CompileErrors

Source§

fn from_iter<I: IntoIterator<Item = CompileError>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl Index<usize> for CompileErrors

Source§

type Output = CompileError

The returned type after indexing.
Source§

fn index(&self, idx: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl IntoIterator for CompileErrors

Source§

type Item = CompileError

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<<CompileErrors as IntoIterator>::Item>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl MultiErrorDisplay<CompileError> for CompileErrors

Source§

fn write_all_stderr(&self)

Source§

fn write_all_to(&self, w: &mut impl Write)

Source§

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

Source§

impl Stream<CompileError> for CompileErrors

Source§

fn payload(self) -> Vec<CompileError>

Source§

fn ref_payload(&self) -> &Vec<CompileError>

Source§

fn ref_mut_payload(&mut self) -> &mut Vec<CompileError>

Source§

fn clear(&mut self)

Source§

fn len(&self) -> usize

Source§

fn size(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

fn insert(&mut self, idx: usize, elem: T)

Source§

fn remove(&mut self, idx: usize) -> T

Source§

fn push(&mut self, elem: T)

Source§

fn append<S>(&mut self, s: &mut S)
where S: Stream<T>,

Source§

fn pop(&mut self) -> Option<T>

Source§

fn lpop(&mut self) -> Option<T>

Source§

fn get(&self, idx: usize) -> Option<&T>

Source§

fn get_mut(&mut self, idx: usize) -> Option<&mut T>

Source§

fn first(&self) -> Option<&T>

Source§

fn first_mut(&mut self) -> Option<&mut T>

Source§

fn last(&self) -> Option<&T>

Source§

fn last_mut(&mut self) -> Option<&mut T>

Source§

fn iter(&self) -> Iter<'_, T>

Source§

fn iter_mut(&mut self) -> IterMut<'_, T>

Source§

fn take_all(&mut self) -> Vec<T>

Source§

fn extend<I>(&mut self, iter: I)
where I: IntoIterator<Item = T>,

Source§

fn split_off(&mut self, at: usize) -> Vec<T>

Source§

fn retain(&mut self, f: impl FnMut(&T) -> bool)

Remove all elements that don’t satisfy the predicate.
Source§

fn concat(self, other: Self) -> Self

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> 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 = 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>,

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.