Struct sway_core::error::CompileResult [−][src]
pub struct CompileResult<'sc, T> {
pub value: Option<T>,
pub warnings: Vec<CompileWarning<'sc>>,
pub errors: Vec<CompileError<'sc>>,
}
Fields
value: Option<T>
warnings: Vec<CompileWarning<'sc>>
errors: Vec<CompileError<'sc>>
Implementations
pub fn ok(
self,
warnings: &mut Vec<CompileWarning<'sc>>,
errors: &mut Vec<CompileError<'sc>>
) -> Option<T>
pub fn flat_map<U, F: FnOnce(T) -> CompileResult<'sc, U>>(
self,
f: F
) -> CompileResult<'sc, U>
pub fn unwrap(
self,
warnings: &mut Vec<CompileWarning<'sc>>,
errors: &mut Vec<CompileError<'sc>>
) -> T
pub fn unwrap_or_else<F: FnOnce() -> T>(
self,
warnings: &mut Vec<CompileWarning<'sc>>,
errors: &mut Vec<CompileError<'sc>>,
or_else: F
) -> T
Trait Implementations
Auto Trait Implementations
impl<'sc, T> RefUnwindSafe for CompileResult<'sc, T> where
T: RefUnwindSafe,
impl<'sc, T> Send for CompileResult<'sc, T> where
T: Send,
impl<'sc, T> Sync for CompileResult<'sc, T> where
T: Sync,
impl<'sc, T> Unpin for CompileResult<'sc, T> where
T: Unpin,
impl<'sc, T> UnwindSafe for CompileResult<'sc, T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more