pub struct RuntimeRequestSession<'key> { /* private fields */ }Expand description
No Clone, Debug or serialization: neither the borrowed key nor session state may be copied into another receiver to reset its replay counter.
Implementations§
Source§impl<'key> RuntimeRequestSession<'key>
impl<'key> RuntimeRequestSession<'key>
Sourcepub fn new(
key: &'key [u8; 32],
session_id: String,
admitted: &EngineInvocationV1,
) -> Result<Self, RuntimeSessionError>
pub fn new( key: &'key [u8; 32], session_id: String, admitted: &EngineInvocationV1, ) -> Result<Self, RuntimeSessionError>
Bind locally trusted admission, not a peer-supplied assertion of admission. The owner provisions and protects the key, serializes access to this receiver, and retires it on reconnect/revocation. Never reuse a session key.
Sourcepub fn accept(
&mut self,
frame: &[u8],
now_unix_ms: u64,
) -> Result<RuntimeRequestV1, RuntimeSessionError>
pub fn accept( &mut self, frame: &[u8], now_unix_ms: u64, ) -> Result<RuntimeRequestV1, RuntimeSessionError>
Authenticate before JSON parsing; admit exact scope and consecutive sequence. Invalid input never advances state. A successful request is consumed even if later execution fails, so it cannot be replayed to repeat side effects. Callers still enforce a monotonic I/O deadline and live policy revocation.
Auto Trait Implementations§
impl<'key> Freeze for RuntimeRequestSession<'key>
impl<'key> RefUnwindSafe for RuntimeRequestSession<'key>
impl<'key> Send for RuntimeRequestSession<'key>
impl<'key> Sync for RuntimeRequestSession<'key>
impl<'key> Unpin for RuntimeRequestSession<'key>
impl<'key> UnsafeUnpin for RuntimeRequestSession<'key>
impl<'key> UnwindSafe for RuntimeRequestSession<'key>
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