pub struct RuntimeConfigSnapshot { /* private fields */ }Expand description
Immutable runtime configuration snapshot.
A snapshot is readable after later reconfiguration because the runtime
publishes a new Arc instead of mutating existing slots.
§Examples
use tenferro_runtime::RuntimeConfigBuilder;
let runtime = RuntimeConfigBuilder::new().build()?;
let snapshot = runtime.snapshot()?;
assert_eq!(snapshot.engine_count(), 0);Implementations§
Source§impl RuntimeConfigSnapshot
impl RuntimeConfigSnapshot
Sourcepub fn runtime_id(&self) -> RuntimeId
pub fn runtime_id(&self) -> RuntimeId
Return the runtime identity that published this snapshot.
Sourcepub fn epoch(&self) -> RuntimeEpoch
pub fn epoch(&self) -> RuntimeEpoch
Return the epoch for this immutable snapshot.
Sourcepub fn execution_policy(&self) -> &ExecutionPolicy
pub fn execution_policy(&self) -> &ExecutionPolicy
Return the execution policy captured by this snapshot.
Sourcepub fn engine_count(&self) -> usize
pub fn engine_count(&self) -> usize
Return the number of direct engine slots.
Sourcepub fn extension_module_count(&self) -> usize
pub fn extension_module_count(&self) -> usize
Return the number of installed extension modules.
Sourcepub fn transfer_provider_count(&self) -> usize
pub fn transfer_provider_count(&self) -> usize
Return the number of registered transfer providers.
Sourcepub fn engine(&self, id: &EngineId) -> Option<EngineSnapshotView<'_>>
pub fn engine(&self, id: &EngineId) -> Option<EngineSnapshotView<'_>>
Return an immutable view of a registered engine slot.
Trait Implementations§
Source§impl Clone for RuntimeConfigSnapshot
impl Clone for RuntimeConfigSnapshot
Source§fn clone(&self) -> RuntimeConfigSnapshot
fn clone(&self) -> RuntimeConfigSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RuntimeConfigSnapshot
impl !RefUnwindSafe for RuntimeConfigSnapshot
impl Send for RuntimeConfigSnapshot
impl Sync for RuntimeConfigSnapshot
impl Unpin for RuntimeConfigSnapshot
impl UnsafeUnpin for RuntimeConfigSnapshot
impl !UnwindSafe for RuntimeConfigSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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