Trait BackendSessionHost
pub trait BackendSessionHost: BackendRuntimeCache {
// Provided method
fn with_backend_session<R>(
&mut self,
f: impl FnOnce(&mut dyn BackendSession) -> R + Send,
) -> R
where R: Send,
Self: Sized + TensorBackend { ... }
}Expand description
Backend execution-session entry points.
with_backend_session is the canonical user entry; one-shot concrete ops
delegate to the session form. with_backend_session_cached is the
runtime-cache-aware entry used by the runtime layer.
§Examples
use tenferro_tensor::BackendSessionHost;
fn accepts_session_host<B: BackendSessionHost>(_backend: &mut B) {}Provided Methods§
fn with_backend_session<R>( &mut self, f: impl FnOnce(&mut dyn BackendSession) -> R + Send, ) -> R
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".