[][src]Enum corewars_parser::Result

#[must_use = "this `Result` may be an `Err` variant, which should be handled"]pub enum Result<T> {
    Ok(T, Vec<Warning>),
    Err(ErrorVec<Warning>),
}

Result mimics the std::result::Result type, but each variant also carries zero or more Warnings with it.

Variants

Ok(T, Vec<Warning>)

Contains the success value and zero or more warnings

Err(ErrorVec<Warning>)

Contains the error value and zero or more warnings

Implementations

impl<T> Result<T>[src]

pub fn ok(value: T) -> Self[src]

Create an Ok variant from a value.

pub fn err(err: Error) -> Self[src]

Create an Err variant from an error.

Trait Implementations

impl<T> From<Error> for Result<T>[src]

impl<T> From<Result<T, Error>> for Result<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Result<T> where
    T: RefUnwindSafe

impl<T> Send for Result<T> where
    T: Send

impl<T> Sync for Result<T> where
    T: Sync

impl<T> Unpin for Result<T> where
    T: Unpin

impl<T> UnwindSafe for Result<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.