pub struct Prepared { /* private fields */ }Expand description
A compiled graph prepared for a set of engine targets.
A prepared program holds the execution plan and the requirements each target slot puts on its engine; it holds no engine, stream or event state, so any engines that report the same targets can run it, and several callers can run it at the same time on their own engines. It is tied to the runtime epoch that created it and becomes stale after runtime reconfiguration.
§Examples
use tenferro_runtime::Prepared;
fn target_count(prepared: &Prepared) -> usize {
prepared.targets().len()
}Implementations§
Source§impl Prepared
impl Prepared
Sourcepub fn targets(&self) -> &[EngineTarget]
pub fn targets(&self) -> &[EngineTarget]
The engine targets this program was prepared for, in slot order.
crate::Runtime::run binds slot i to the i-th engine it receives.
§Examples
use tenferro_runtime::Prepared;
fn first_engine(prepared: &Prepared) -> Option<&str> {
prepared.targets().first().map(|target| target.engine_id().as_str())
}Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Prepared
impl !UnwindSafe for Prepared
impl Freeze for Prepared
impl Send for Prepared
impl Sync for Prepared
impl Unpin for Prepared
impl UnsafeUnpin for Prepared
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