Skip to main content

BoundedTransferModel

Struct BoundedTransferModel 

Source
pub struct BoundedTransferModel<T> {
    pub slot_capacity: nat,
    pub retained_byte_capacity: nat,
    pub values: Seq<T>,
    pub registry: Seq<(u64, u64)>,
    pub retained_bytes: nat,
    pub head: nat,
    pub tail: nat,
    pub closed: bool,
}
Expand description

Erased logical view shared by every bounded-transfer realization.

Fields§

§slot_capacity: nat

Maximum retained record count.

§retained_byte_capacity: nat

Maximum retained encoded byte count.

§values: Seq<T>

Retained records in FIFO order.

§registry: Seq<(u64, u64)>

Encoded key-size registry for retained records.

§retained_bytes: nat

Total encoded bytes retained.

§head: nat

Monotone consumed-record cursor.

§tail: nat

Monotone admitted-record cursor.

§closed: bool

Whether the transfer owner is closed to new records.

Auto Trait Implementations§

§

impl<T> Freeze for BoundedTransferModel<T>
where Seq<T>: Freeze,

§

impl<T> RefUnwindSafe for BoundedTransferModel<T>
where Seq<T>: RefUnwindSafe,

§

impl<T> Send for BoundedTransferModel<T>
where Seq<T>: Send,

§

impl<T> Sync for BoundedTransferModel<T>
where Seq<T>: Sync,

§

impl<T> Unpin for BoundedTransferModel<T>
where Seq<T>: Unpin,

§

impl<T> UnsafeUnpin for BoundedTransferModel<T>
where Seq<T>: UnsafeUnpin,

§

impl<T> UnwindSafe for BoundedTransferModel<T>
where Seq<T>: UnwindSafe,

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, 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, <T as TryFrom<U>>::Error>

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.