Skip to main content

LimitAdapter

Struct LimitAdapter 

Source
pub struct LimitAdapter<'a> { /* private fields */ }
Expand description

Exclusively owns the guard engine while a limit may be retried by that engine. Drop on timeout or disconnect. This discards queued frames and retransmission timers. The local journal retains the consumed dispatch for reconciliation.

Implementations§

Source§

impl<'a> LimitAdapter<'a>

Source

pub fn new( local: &'a mut LocalDevice, engine: Engine, client: FeatureAddress, server: FeatureAddress, ) -> Result<Self, AdapterError>

Bind a SPINE engine holding exactly two complete LoadControl read replies (descriptions and current limits) to one authenticated session and route. On construction failure the supplied SPINE engine is discarded.

Source

pub fn dispatch( &mut self, request_id: &str, now: Clock, ) -> Result<MsgCounter, AdapterError>

Queue one authorized write with its current remaining duration. Discovery and binding errors leave the one-shot dispatch authorization available.

Source

pub fn poll_transmit(&mut self) -> Option<Datagram>

Take the write for immediate delivery on this authenticated session.

Source

pub fn deadline(&self) -> Option<Duration>

First SPINE response deadline in the elapsed clock domain. On timeout, discard this adapter, then reconcile the outstanding CLS.EEDI operation.

Source

pub fn handle_datagram( &mut self, packet: &Datagram, now: Clock, ) -> Result<Option<Completion>, AdapterError>

Accept a single result delivered by the authenticated, directly connected peer. Unrelated frames return None. A device component omitted in simple addressing resolves to its authenticated endpoint (SPINE §5.2.2.1).

Source

pub fn finish(&mut self, now: Clock) -> Result<Option<Completion>, AdapterError>

Retry the local journal transition if, for example, recording a definitive equipment result failed due to an invalid local clock.

Source

pub fn into_engine(self) -> Result<Engine, AdapterError>

Recover a clean engine. An unresolved write destroys the engine, including its SPINE retry buffer, and remains pending on the local device.

Auto Trait Implementations§

§

impl<'a> !UnwindSafe for LimitAdapter<'a>

§

impl<'a> Freeze for LimitAdapter<'a>

§

impl<'a> RefUnwindSafe for LimitAdapter<'a>

§

impl<'a> Send for LimitAdapter<'a>

§

impl<'a> Sync for LimitAdapter<'a>

§

impl<'a> Unpin for LimitAdapter<'a>

§

impl<'a> UnsafeUnpin for LimitAdapter<'a>

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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.