pub enum Refusal<E> {
Own(E),
NoAnswer(NoAnswer),
}Expand description
Why a Tool whose result is Result<R, E> has no R: its own error E,
answered as the value Err(e), or no answer at all. A Tool function
returning Result<R, Refusal<E>> declares Result<R, E>; ? turns an
E into a refusal, and the constructors make the rest.
Variants§
Implementations§
Source§impl<E> Refusal<E>
impl<E> Refusal<E>
Sourcepub fn not_started(reason: String) -> Refusal<E>
pub fn not_started(reason: String) -> Refusal<E>
The work did not begin, and why.
Sourcepub fn interrupted(reason: String) -> Refusal<E>
pub fn interrupted(reason: String) -> Refusal<E>
The work began and stopped before a value, and why.
Sourcepub fn problem(problem: ToolProblem) -> Refusal<E>
pub fn problem(problem: ToolProblem) -> Refusal<E>
A problem, which answers the call.
Trait Implementations§
impl<E: Eq> Eq for Refusal<E>
impl<E: PartialEq> StructuralPartialEq for Refusal<E>
Auto Trait Implementations§
impl<E> Forget for Refusal<E>
impl<E> Freeze for Refusal<E>
impl<E> Move for Refusal<E>
impl<E> RefUnwindSafe for Refusal<E>where
E: RefUnwindSafe,
impl<E> Send for Refusal<E>
impl<E> Sync for Refusal<E>
impl<E> Unpin for Refusal<E>
impl<E> UnsafeUnpin for Refusal<E>where
E: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<u64>: UnsafeUnpin,
impl<E> UnwindSafe for Refusal<E>where
E: UnwindSafe,
RawVecInner: UnwindSafe,
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