pub struct DeviceRailProvider { /* private fields */ }Expand description
The DeviceRail provider. Holds the capability lockfile the flow was
compiled against; open_session re-attests the live world against it.
Implementations§
Source§impl DeviceRailProvider
impl DeviceRailProvider
Sourcepub fn new(lockfile: CapabilityLockfile) -> Result<Self, ProviderError>
pub fn new(lockfile: CapabilityLockfile) -> Result<Self, ProviderError>
Creates a provider around the held lockfile, verifying its self-consistency (a tampered or hand-edited lockfile fails closed).
Sourcepub fn lockfile(&self) -> &CapabilityLockfile
pub fn lockfile(&self) -> &CapabilityLockfile
The held lockfile baseline.
Trait Implementations§
Source§impl Clone for DeviceRailProvider
impl Clone for DeviceRailProvider
Source§fn clone(&self) -> DeviceRailProvider
fn clone(&self) -> DeviceRailProvider
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 moreSource§impl Debug for DeviceRailProvider
impl Debug for DeviceRailProvider
Source§impl Provider for DeviceRailProvider
impl Provider for DeviceRailProvider
Source§fn manifest(&self) -> &ProviderManifest
fn manifest(&self) -> &ProviderManifest
The package-shipped static capability declaration.
Source§fn open_session<'life0, 'async_trait>(
&'life0 self,
opts: OpenSessionOptions,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ProviderSession>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn open_session<'life0, 'async_trait>(
&'life0 self,
opts: OpenSessionOptions,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ProviderSession>, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Opens a session. Atomic (04 §2.1): returning means the connection is
up, the protocol is negotiated with all
requiredFeatures satisfied,
the device is selected and connected, the substrate session is
started, and attestation matched lockfileDigest. On any failure the
provider cleans up partial resources and fails — never a half-open
session. Failure classes: negotiation/capability mismatch →
capability_drift; device unavailable → action_failed_retryable;
connection failure → transport_lost.Auto Trait Implementations§
impl Freeze for DeviceRailProvider
impl RefUnwindSafe for DeviceRailProvider
impl Send for DeviceRailProvider
impl Sync for DeviceRailProvider
impl Unpin for DeviceRailProvider
impl UnsafeUnpin for DeviceRailProvider
impl UnwindSafe for DeviceRailProvider
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