pub struct MailboxBuffers {
pub inbox: Vec<MessageRow>,
pub channel: Vec<MessageRow>,
pub wire: Vec<MessageRow>,
pub inbox_after: i64,
pub channel_after: i64,
pub wire_after: i64,
}Expand description
Per-agent buffer state — three tabs, three after_id cursors.
Lives on App so swapping the focused agent resets the cursors
without trying to back-fill: the operator sees only forward
motion in the tab they’re watching.
Fields§
§inbox: Vec<MessageRow>§channel: Vec<MessageRow>§wire: Vec<MessageRow>§inbox_after: i64§channel_after: i64§wire_after: i64Implementations§
Source§impl MailboxBuffers
impl MailboxBuffers
pub fn rows(&self, tab: MailboxTab) -> &[MessageRow]
Sourcepub fn extend(&mut self, tab: MailboxTab, batch: Vec<MessageRow>)
pub fn extend(&mut self, tab: MailboxTab, batch: Vec<MessageRow>)
Fold a freshly-fetched batch into the appropriate tab,
trimming to the last MAX_TAB_ROWS. Bumps the cursor to the
last returned id when the batch is non-empty.
Trait Implementations§
Source§impl Clone for MailboxBuffers
impl Clone for MailboxBuffers
Source§fn clone(&self) -> MailboxBuffers
fn clone(&self) -> MailboxBuffers
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MailboxBuffers
impl Debug for MailboxBuffers
Source§impl Default for MailboxBuffers
impl Default for MailboxBuffers
Source§fn default() -> MailboxBuffers
fn default() -> MailboxBuffers
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MailboxBuffers
impl RefUnwindSafe for MailboxBuffers
impl Send for MailboxBuffers
impl Sync for MailboxBuffers
impl Unpin for MailboxBuffers
impl UnsafeUnpin for MailboxBuffers
impl UnwindSafe for MailboxBuffers
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more