Struct fend_core::FendResult
source · pub struct FendResult { /* private fields */ }
Expand description
This contains the result of a computation.
Implementations§
source§impl FendResult
impl FendResult
sourcepub fn get_main_result(&self) -> &str
pub fn get_main_result(&self) -> &str
This retrieves the main result of the computation.
sourcepub fn get_main_result_spans(&self) -> impl Iterator<Item = SpanRef<'_>>
pub fn get_main_result_spans(&self) -> impl Iterator<Item = SpanRef<'_>>
This retrieves the main result as a list of spans, which is useful for colored output.
sourcepub fn is_unit_type(&self) -> bool
pub fn is_unit_type(&self) -> bool
Returns whether or not the result is the ()
type. It can sometimes
be useful to hide these values.
sourcepub fn has_trailing_newline(&self) -> bool
pub fn has_trailing_newline(&self) -> bool
Returns whether or not the result should be outputted with a
trailing newline. This is controlled by the @no_trailing_newline
attribute.
Trait Implementations§
source§impl Debug for FendResult
impl Debug for FendResult
source§impl PartialEq for FendResult
impl PartialEq for FendResult
source§fn eq(&self, other: &FendResult) -> bool
fn eq(&self, other: &FendResult) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for FendResult
impl StructuralPartialEq for FendResult
Auto Trait Implementations§
impl Freeze for FendResult
impl RefUnwindSafe for FendResult
impl Send for FendResult
impl Sync for FendResult
impl Unpin for FendResult
impl UnwindSafe for FendResult
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more