pub struct Intent { /* private fields */ }Expand description
Fields are private so ordinary callers cannot skip ownership validation. Restore accepts only an operator-protected state record with independent expected request pins; it does not authenticate disk bytes or prevent rollback.
Implementations§
Source§impl Intent
impl Intent
Sourcepub fn prepare(
request: &Request,
inspection: &Response,
required_labels: &[Label],
) -> Result<Self, Invalid>
pub fn prepare( request: &Request, inspection: &Response, required_labels: &[Label], ) -> Result<Self, Invalid>
The coordinator must independently authenticate the inspection producer and pin required labels from its lease, never from the adapter response.
pub fn phase(&self) -> Phase
pub fn request(&self) -> &Request
Sourcepub fn begin_dispatch(&self, expected: &Request) -> Result<Self, Invalid>
pub fn begin_dispatch(&self, expected: &Request) -> Result<Self, Invalid>
Commit this Unknown state before dispatch. A crash between commit and dispatch is conservative: recovery must inspect, never blindly retry.
Sourcepub fn observe_dispatch(
&self,
expected: &Request,
response: Option<&Response>,
) -> Result<Self, Invalid>
pub fn observe_dispatch( &self, expected: &Request, response: Option<&Response>, ) -> Result<Self, Invalid>
None represents transport loss/cancellation/error. Every valid mutation response, including completed/rejected-before-effect, leaves Unknown. Invalid responses return an error without modifying the original state.
Trait Implementations§
impl Eq for Intent
impl StructuralPartialEq for Intent
Auto Trait Implementations§
impl Freeze for Intent
impl RefUnwindSafe for Intent
impl Send for Intent
impl Sync for Intent
impl Unpin for Intent
impl UnsafeUnpin for Intent
impl UnwindSafe for Intent
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