pub trait IntoLive {
// Required method
fn into_live(self) -> Arc<Live> ⓘ;
}Expand description
What a projection is built over: something that can hand out the current context.
One trait so that the shared server passes the Live it watches with and every other
caller — one-shot commands, benchmarks, the crate’s own tests — passes the
Arc<Context> it already has and gets a pinned view without saying so.
// a projection takes either, and neither caller has to say which it holds
fn projection(over: impl IntoLive) -> u64 { over.into_live().generation() }
assert_eq!(projection(ctx), 0);
assert_eq!(projection(live), 0);Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".