Skip to main content

Completion

Struct Completion 

Source
pub struct Completion { /* private fields */ }
Expand description

An owned completion observer. Dropping it does not cancel submitted work.

Polling never waits for a device. Clones may be waited on by different tasks.

Implementations§

Source§

impl Completion

Source

pub fn finished_at(&self) -> Option<Instant>

Host monotonic time at which execution reached a terminal state. This permits pipeline boundary timing without including a caller’s late wait. It is not a device timestamp and does not imply successful execution.

Source

pub fn profile(&self) -> Option<CompletionProfile>

Inspect final host-observed timing without waiting for completion.

Source

pub fn result(&self) -> Option<Result<()>>

Observe a terminal result without blocking, or None while pending.

Source

pub fn is_complete(&self) -> bool

Whether the operation reached a terminal state, including failure.

Source

pub fn wait(&self) -> Result<()>

Wait for device completion, propagating execution failure. The caller may execute ready regions from this submission to avoid a worker handoff. Engine limits and all dependency checks still apply.

Examples found in repository?
examples/graph_prepare.rs (line 29)
4fn main() -> hrx::Result<()> {
5    let runtime = Runtime::new()?;
6    let buffer = runtime.allocate(4096, MemoryPlacement::GpuLocal)?;
7    let stream = Stream::open()?;
8    let raw = stream.allocate(4096)?;
9    for count in [128, 512, 1024, 2048] {
10        let begin = Instant::now();
11        let mut graph = runtime.graph();
12        for _ in 0..count {
13            graph.fill(buffer.view(), 0)?;
14        }
15        let graph = graph.prepare()?;
16        let inferred = begin.elapsed();
17        let begin = Instant::now();
18        let mut native = stream.graph()?;
19        let mut last = None;
20        for _ in 0..count {
21            last = Some(native.fill(last.as_slice(), raw.binding(), 0)?);
22        }
23        let _native = native.finish()?;
24        println!(
25            "nodes={count} inferred_us={} explicit_us={}",
26            inferred.as_micros(),
27            begin.elapsed().as_micros()
28        );
29        graph.submit()?.wait()?;
30    }
31    Ok(())
32}
More examples
Hide additional examples
examples/shared_roundtrip.rs (line 46)
8fn main() -> Result<()> {
9    let args: Vec<_> = std::env::args().collect();
10    if args.len() != 4 {
11        return Err(hrx::Error::Message(
12            "usage: shared_roundtrip <passthrough.xclbin> <instructions.bin> <bytes>".into(),
13        ));
14    }
15    let bytes = args[3]
16        .parse::<usize>()
17        .map_err(|e| hrx::Error::Message(e.to_string()))?;
18    let runtime = Runtime::new()?;
19    // This example accepts trusted local artifacts with the documented ABI.
20    let program = unsafe { runtime.npu(0)?.load_program(&args[1]) }?;
21    let binding = |bytes, access| BindingContract {
22        bytes,
23        access,
24        alignment: 4,
25        layout: "u32 passthrough".into(),
26    };
27    let contract = KernelContract {
28        bindings: vec![
29            binding(bytes, Access::Read),
30            binding(4096, Access::Read),
31            binding(bytes, Access::Write),
32        ],
33        constants: vec![],
34    };
35    let kernel = unsafe { program.kernel(&std::fs::read(&args[2])?, contract) }?;
36    let a = runtime.allocate(bytes, MemoryPlacement::Shared(program.clone()))?;
37    let b = runtime.allocate(4096, MemoryPlacement::Shared(program.clone()))?;
38    let c = runtime.allocate(bytes, MemoryPlacement::Shared(program.clone()))?;
39    let result = runtime.allocate(bytes, MemoryPlacement::Shared(program.clone()))?;
40    let mut graph = runtime.graph();
41    graph.fill(a.view(), 0x5a)?;
42    graph.npu(&kernel, &[a.view(), b.view(), c.view()])?;
43    graph.copy(result.view(), c.view())?;
44    let graph = graph.prepare()?;
45    for _ in 0..10 {
46        graph.submit()?.wait()?;
47        let mapped = result.map_read()?;
48        if mapped.iter().any(|&b| b != 0x5a) {
49            return Err(hrx::Error::Message("GPU/NPU roundtrip mismatch".into()));
50        }
51    }
52    println!(
53        "GPU -> NPU -> GPU: all {bytes} bytes correct, 10 executions, {} prepared regions",
54        graph.regions()
55    );
56    Ok(())
57}
examples/shared_bench.rs (line 48)
9fn main() -> Result<()> {
10    let args: Vec<_> = std::env::args().collect();
11    if args.len() != 4 {
12        return Err(hrx::Error::Message(
13            "usage: shared_bench <passthrough.xclbin> <instructions.bin> <bytes>".into(),
14        ));
15    }
16    let bytes = args[3]
17        .parse::<usize>()
18        .map_err(|e| hrx::Error::Message(e.to_string()))?;
19    let runtime = Runtime::new()?;
20    let program = unsafe { runtime.npu(0)?.load_program(&args[1]) }?;
21    let binding = |bytes, access| BindingContract {
22        bytes,
23        access,
24        alignment: 4,
25        layout: "passthrough".into(),
26    };
27    let kernel = unsafe {
28        program.kernel(
29            &std::fs::read(&args[2])?,
30            KernelContract {
31                bindings: vec![
32                    binding(bytes, Access::Read),
33                    binding(4096, Access::Read),
34                    binding(bytes, Access::Write),
35                ],
36                constants: vec![],
37            },
38        )
39    }?;
40    let a = runtime.allocate(bytes, MemoryPlacement::Shared(program.clone()))?;
41    let b = runtime.allocate(4096, MemoryPlacement::Shared(program.clone()))?;
42    let c = runtime.allocate(bytes, MemoryPlacement::Shared(program.clone()))?;
43    let mut graph = runtime.graph();
44    graph.fill(a.view(), 0x35)?;
45    graph.npu(&kernel, &[a.view(), b.view(), c.view()])?;
46    let graph = graph.prepare()?;
47    for _ in 0..5 {
48        graph.submit()?.wait()?;
49    }
50    let mut samples = Vec::new();
51    for _ in 0..100 {
52        let start = Instant::now();
53        graph.submit()?.wait()?;
54        samples.push(start.elapsed().as_secs_f64());
55    }
56    if c.map_read()?.iter().any(|&b| b != 0x35) {
57        return Err(hrx::Error::Message("incorrect benchmark output".into()));
58    }
59    samples.sort_by(f64::total_cmp);
60    println!(
61        "bytes={bytes} p50_us={:.2} p95_us={:.2}",
62        percentile(&samples, 50) * 1e6,
63        percentile(&samples, 95) * 1e6
64    );
65    Ok(())
66}
examples/gemm_pipeline.rs (line 136)
58fn main() -> Result<()> {
59    let args: Vec<_> = std::env::args().collect();
60    if args.len() != 6 {
61        return Err(hrx::Error::Message(
62            "usage: gemm_pipeline <row-major-bf16.xclbin> <instructions.bin> M K N".into(),
63        ));
64    }
65    let parse = |i: usize| {
66        args[i]
67            .parse::<usize>()
68            .map_err(|e| hrx::Error::Message(e.to_string()))
69    };
70    let (m, k, n) = (parse(3)?, parse(4)?, parse(5)?);
71    let extent = |a: usize, b: usize, width: usize| {
72        a.checked_mul(b)
73            .filter(|&count| count > 0 && count <= (1 << 30))
74            .and_then(|count| count.checked_mul(width))
75            .ok_or_else(|| hrx::Error::Message("invalid matrix extent".into()))
76    };
77    let (a_bytes, b_bytes, c_bytes) = (extent(m, k, 2)?, extent(k, n, 2)?, extent(m, n, 4)?);
78    let runtime = Runtime::new()?;
79    let program = unsafe { runtime.npu(0)?.load_program(&args[1]) }?;
80    let npu = unsafe {
81        program.kernel(
82            &std::fs::read(&args[2])?,
83            KernelContract {
84                bindings: vec![
85                    binding(a_bytes, Access::Read),
86                    binding(b_bytes, Access::Read),
87                    binding(c_bytes, Access::Write),
88                ],
89                constants: vec![],
90            },
91        )
92    }?;
93    let prep = gpu_kernel(
94        &runtime,
95        include_str!("../tests/kernels/euler.loom"),
96        "krea2_euler",
97        &[
98            ("krea2.euler.grid_x", (m * k).div_ceil(256).to_string()),
99            ("krea2.euler.grid_y", "1".into()),
100        ],
101        m * k,
102        vec![
103            binding(a_bytes, Access::ReadWrite),
104            binding(a_bytes, Access::Read),
105        ],
106    )?;
107    let epilogue = gpu_kernel(
108        &runtime,
109        include_str!("../tests/kernels/add_f32.loom"),
110        "add_f32",
111        &[("add.grid", (m * n).div_ceil(256).to_string())],
112        m * n,
113        vec![binding(c_bytes, Access::ReadWrite)],
114    )?;
115    let allocate = |bytes| runtime.allocate(bytes, MemoryPlacement::Shared(program.clone()));
116    let weights = allocate(b_bytes)?;
117    let ones = allocate(a_bytes)?;
118    for buffer in [&weights, &ones] {
119        for word in buffer.map_write()?.as_chunks_mut::<2>().0 {
120            word.copy_from_slice(&0x3f80u16.to_le_bytes());
121        }
122    }
123    let prepare = || -> Result<(ExecutableGraph, Buffer)> {
124        let a = allocate(a_bytes)?;
125        let c = allocate(c_bytes)?;
126        let mut graph = runtime.graph();
127        graph.fill(a.view(), 0)?;
128        graph.gpu(&prep, &[a.view(), ones.view()])?;
129        graph.npu(&npu, &[a.view(), weights.view(), c.view()])?;
130        graph.gpu(&epilogue, &[c.view()])?;
131        Ok((graph.prepare()?, c))
132    };
133    let (first, c0) = prepare()?;
134    let (second, c1) = prepare()?;
135    for _ in 0..5 {
136        first.submit()?.wait()?;
137        second.submit()?.wait()?;
138    }
139    let before = runtime.statistics();
140    let mut latency = Vec::with_capacity(50);
141    for _ in 0..50 {
142        let start = Instant::now();
143        first.submit()?.wait()?;
144        latency.push(start.elapsed().as_secs_f64());
145    }
146    let start = Instant::now();
147    for _ in 0..50 {
148        let a = first.submit()?;
149        let b = second.submit()?;
150        a.wait()?;
151        b.wait()?;
152    }
153    let requests_per_second = 100.0 / start.elapsed().as_secs_f64();
154    for c in [&c0, &c1] {
155        if c.map_read()?
156            .as_chunks::<4>()
157            .0
158            .iter()
159            .any(|v| f32::from_le_bytes(*v) != k as f32 + 1.0)
160        {
161            return Err(hrx::Error::Message("GEMM pipeline output mismatch".into()));
162        }
163    }
164    let after = runtime.statistics();
165    assert_eq!(before.allocations, after.allocations);
166    assert_eq!(before.imports, after.imports);
167    assert_eq!(after.copied_bytes, 0);
168    latency.sort_by(f64::total_cmp);
169    println!(
170        "M={m} K={k} N={n} p50_ms={:.3} p95_ms={:.3} pipelined_requests_s={requests_per_second:.2}",
171        percentile(&latency, 50) * 1e3,
172        percentile(&latency, 95) * 1e3
173    );
174    println!("{}", serde_json::to_string(&after)?);
175    Ok(())
176}
Source

pub fn wait_timeout(&self, timeout: Duration) -> Result<bool>

Wait at most timeout. false leaves execution and ownership intact.

Source

pub fn cancel(&self)

Cancel unscheduled nodes. Running native work is drained before completion. This request does not revoke resources or abort an unrelated submission.

Trait Implementations§

Source§

impl Clone for Completion

Source§

fn clone(&self) -> Completion ⓘ

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Future for Completion

Source§

type Output = Result<(), Error>

The type of value produced on completion.
Source§

fn poll(self: Pin<&mut Self>, context: &mut Context<'_>) -> Poll<Self::Output>

Attempts to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DropFlavorWrapper<T> for T

Source§

type Flavor = MayDrop

The DropFlavor that wraps T into Self
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T
where T: Future + ?Sized,

Source§

fn with_cancellation_token( self, cancellation_token: &CancellationToken, ) -> WithCancellationTokenFuture<'_, Self>
where Self: Sized,

Similar to CancellationToken::run_until_cancelled, but with the advantage that it is easier to write fluent call chains. Read more
Source§

fn with_cancellation_token_owned( self, cancellation_token: CancellationToken, ) -> WithCancellationTokenFutureOwned<Self>
where Self: Sized,

Similar to CancellationToken::run_until_cancelled_owned, but with the advantage that it is easier to write fluent call chains. Read more
Source§

impl<T> FutureExt for T
where T: Future + ?Sized,

Source§

fn map<U, F>(self, f: F) -> Map<Self, F> ⓘ
where F: FnOnce(Self::Output) -> U, Self: Sized,

Map this future’s output to a different type, returning a new future of the resulting type. Read more
Source§

fn map_into<U>(self) -> MapInto<Self, U> ⓘ
where Self::Output: Into<U>, Self: Sized,

Map this future’s output to a different type, returning a new future of the resulting type. Read more
Source§

fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F> ⓘ
where F: FnOnce(Self::Output) -> Fut, Fut: Future, Self: Sized,

Chain on a computation for when a future finished, passing the result of the future to the provided closure f. Read more
Source§

fn left_future<B>(self) -> Either<Self, B> ⓘ
where B: Future<Output = Self::Output>, Self: Sized,

Wrap this future in an Either future, making it the left-hand variant of that Either. Read more
Source§

fn right_future<A>(self) -> Either<A, Self> ⓘ
where A: Future<Output = Self::Output>, Self: Sized,

Wrap this future in an Either future, making it the right-hand variant of that Either. Read more
Source§

fn into_stream(self) -> IntoStream<Self>
where Self: Sized,

Convert this future into a single element stream. Read more
Source§

fn flatten(self) -> Flatten<Self> ⓘ
where Self::Output: Future, Self: Sized,

Flatten the execution of this future when the output of this future is itself another future. Read more
Source§

fn flatten_stream(self) -> FlattenStream<Self>
where Self::Output: Stream, Self: Sized,

Flatten the execution of this future when the successful result of this future is a stream. Read more
Source§

fn fuse(self) -> Fuse<Self> ⓘ
where Self: Sized,

Fuse a future such that poll will never again be called once it has completed. This method can be used to turn any Future into a FusedFuture. Read more
Source§

fn inspect<F>(self, f: F) -> Inspect<Self, F> ⓘ
where F: FnOnce(&Self::Output), Self: Sized,

Do something with the output of a future before passing it on. Read more
Source§

fn catch_unwind(self) -> CatchUnwind<Self> ⓘ
where Self: Sized + UnwindSafe,

Catches unwinding panics while polling the future. Read more
Source§

fn shared(self) -> Shared<Self> ⓘ
where Self: Sized, Self::Output: Clone,

Create a cloneable handle to this future where all handles will resolve to the same result. Read more
Source§

fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)
where Self: Sized,

Turn this future into a future that yields () on completion and sends its output to another future on a separate task. Read more
Source§

fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
where Self: Sized + Send + 'a,

Wrap the future in a Box, pinning it. Read more
Source§

fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
where Self: Sized + 'a,

Wrap the future in a Box, pinning it. Read more
Source§

fn unit_error(self) -> UnitError<Self> ⓘ
where Self: Sized,

Source§

fn never_error(self) -> NeverError<Self> ⓘ
where Self: Sized,

Source§

fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where Self: Unpin,

A convenience for calling Future::poll on Unpin future types.
Source§

fn now_or_never(self) -> Option<Self::Output>
where Self: Sized,

Evaluates and consumes the future, returning the resulting output if the future is ready after the first call to Future::poll. Read more
Source§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

Source§

const WITNESS: W = W::MAKE

A constant of the type witness
Source§

impl<T> Identity for T
where T: ?Sized,

Source§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
Source§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<F> IntoFuture for F
where F: Future,

Source§

type Output = <F as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = F

Which kind of future are we turning this into?
Source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, E, F> TaskFuture<T, E> for F
where F: Future<Output = Result<T, E>> + Send,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<F, T, E> TryFuture for F
where F: Future<Output = Result<T, E>> + ?Sized,

Source§

type Ok = T

The type of successful values yielded by this future
Source§

type Error = E

The type of failures yielded by this future
Source§

fn try_poll( self: Pin<&mut F>, cx: &mut Context<'_>, ) -> Poll<<F as Future>::Output>

Poll this TryFuture as if it were a Future. Read more
Source§

impl<Fut> TryFutureExt for Fut
where Fut: TryFuture + ?Sized,

Source§

fn flatten_sink<Item>(self) -> FlattenSink<Self, Self::Ok>
where Self::Ok: Sink<Item, Error = Self::Error>, Self: Sized,

Flattens the execution of this future when the successful result of this future is a Sink. Read more
Source§

fn map_ok<T, F>(self, f: F) -> MapOk<Self, F> ⓘ
where F: FnOnce(Self::Ok) -> T, Self: Sized,

Maps this future’s success value to a different value. Read more
Source§

fn map_ok_or_else<T, E, F>(self, e: E, f: F) -> MapOkOrElse<Self, F, E> ⓘ
where F: FnOnce(Self::Ok) -> T, E: FnOnce(Self::Error) -> T, Self: Sized,

Maps this future’s success value to a different value, and permits for error handling resulting in the same type. Read more
Source§

fn map_err<E, F>(self, f: F) -> MapErr<Self, F> ⓘ
where F: FnOnce(Self::Error) -> E, Self: Sized,

Maps this future’s error value to a different value. Read more
Source§

fn err_into<E>(self) -> ErrInto<Self, E> ⓘ
where Self: Sized, Self::Error: Into<E>,

Maps this future’s Error to a new error type using the Into trait. Read more
Source§

fn ok_into<U>(self) -> OkInto<Self, U> ⓘ
where Self: Sized, Self::Ok: Into<U>,

Maps this future’s Ok to a new type using the Into trait.
Source§

fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F> ⓘ
where F: FnOnce(Self::Ok) -> Fut, Fut: TryFuture<Error = Self::Error>, Self: Sized,

Executes another future after this one resolves successfully. The success value is passed to a closure to create this subsequent future. Read more
Source§

fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F> ⓘ
where F: FnOnce(Self::Error) -> Fut, Fut: TryFuture<Ok = Self::Ok>, Self: Sized,

Executes another future if this one resolves to an error. The error value is passed to a closure to create this subsequent future. Read more
Source§

fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F> ⓘ
where F: FnOnce(&Self::Ok), Self: Sized,

Do something with the success value of a future before passing it on. Read more
Source§

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F> ⓘ
where F: FnOnce(&Self::Error), Self: Sized,

Do something with the error value of a future before passing it on. Read more
Source§

fn try_flatten(self) -> TryFlatten<Self, Self::Ok> ⓘ
where Self::Ok: TryFuture<Error = Self::Error>, Self: Sized,

Flatten the execution of this future when the successful result of this future is another future. Read more
Source§

fn try_flatten_stream(self) -> TryFlattenStream<Self>
where Self::Ok: TryStream<Error = Self::Error>, Self: Sized,

Flatten the execution of this future when the successful result of this future is a stream. Read more
Source§

fn unwrap_or_else<F>(self, f: F) -> UnwrapOrElse<Self, F> ⓘ
where Self: Sized, F: FnOnce(Self::Error) -> Self::Ok,

Unwraps this future’s output, producing a future with this future’s Ok type as its Output type. Read more
Source§

fn into_future(self) -> IntoFuture<Self> ⓘ
where Self: Sized,

Wraps a TryFuture into a type that implements Future. Read more
Source§

fn try_poll_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Self::Ok, Self::Error>>
where Self: Unpin,

A convenience method for calling TryFuture::try_poll on Unpin future types.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more