pub struct RootSupervisionReturn<T> { /* private fields */ }Expand description
A supervision result cannot be a naked technical code: failure consumes the original source receipt. Runtime retains its own physical ownership outside it.
ⓘ
use saddle_observability::RootSupervisionReturn;
use saddle_core::DiagnosticCode;
let _: RootSupervisionReturn<()> = RootSupervisionReturn::failed(DiagnosticCode::new("task.failed").unwrap());ⓘ
use saddle_observability::{RootSupervisionReturn, RootRequestFailure};
fn replay(f: RootRequestFailure) {
let _first = RootSupervisionReturn::<()>::failed(f);
}Implementations§
Source§impl<T> RootSupervisionReturn<T>
impl<T> RootSupervisionReturn<T>
pub fn completed(value: T) -> Self
pub fn failed(failure: WrittenRootFailure) -> Self
pub fn consume(self) -> Result<T, RootRequestFailure>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for RootSupervisionReturn<T>
impl<T> !UnwindSafe for RootSupervisionReturn<T>
impl<T> Freeze for RootSupervisionReturn<T>
impl<T> Send for RootSupervisionReturn<T>
impl<T> Sync for RootSupervisionReturn<T>
impl<T> Unpin for RootSupervisionReturn<T>
impl<T> UnsafeUnpin for RootSupervisionReturn<T>
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