Skip to main content

RuntimeRequestSession

Struct RuntimeRequestSession 

Source
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>

Source

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.

Source

pub fn new_in( key: &'key [u8; 32], session_id: String, admitted: &EngineInvocationV1, profile: RuntimeExchangeProfile, ) -> Result<Self, RuntimeSessionError>

Self::new with the size profile the owner admitted for this session from its own trusted state. The profile belongs to the session like its scope: what a request says about itself never selects it.

Source

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> Forget for RuntimeRequestSession<'key>

§

impl<'key> Freeze for RuntimeRequestSession<'key>

§

impl<'key> Move 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.