pub trait AsEngineRef {
// Required method
fn as_engine_ref(&self) -> EngineRef<'_>;
// Provided method
fn maybe_as_store(&self) -> Option<StoreRef<'_>> { ... }
}Expand description
Helper trait for a value that is convertible to a EngineRef.
Required Methods§
Sourcefn as_engine_ref(&self) -> EngineRef<'_>
fn as_engine_ref(&self) -> EngineRef<'_>
Create an EngineRef pointing to the underlying context.
Provided Methods§
Sourcefn maybe_as_store(&self) -> Option<StoreRef<'_>>
fn maybe_as_store(&self) -> Option<StoreRef<'_>>
Create a StoreRef.
NOTE: this function will return None if the AsEngineRef implementor is not an
actual crate::Store.