pub struct MockMailboxSource {
pub inbox_rows: Vec<MessageRow>,
pub sent_rows: Vec<MessageRow>,
pub channel_rows: Vec<MessageRow>,
pub wire_rows: Vec<MessageRow>,
pub inbox_calls: Mutex<Vec<(String, i64)>>,
pub sent_calls: Mutex<Vec<(String, i64)>>,
pub channel_calls: Mutex<Vec<(String, i64)>>,
pub wire_calls: Mutex<Vec<(String, i64)>>,
}Expand description
Test stub — returns canned rows on each call, records every arg pair. Mailbox is the most-asserted test surface in PR-UI-3 so the recorder lets snapshot + interaction tests verify “is the right filter being asked the right thing.”
Fields§
§inbox_rows: Vec<MessageRow>§sent_rows: Vec<MessageRow>§channel_rows: Vec<MessageRow>§wire_rows: Vec<MessageRow>§inbox_calls: Mutex<Vec<(String, i64)>>§sent_calls: Mutex<Vec<(String, i64)>>§channel_calls: Mutex<Vec<(String, i64)>>§wire_calls: Mutex<Vec<(String, i64)>>Trait Implementations§
Source§impl Default for MockMailboxSource
impl Default for MockMailboxSource
Source§fn default() -> MockMailboxSource
fn default() -> MockMailboxSource
Returns the “default value” for a type. Read more
Source§impl MailboxSource for MockMailboxSource
impl MailboxSource for MockMailboxSource
fn inbox(&self, agent_id: &str, after_id: i64) -> Result<Vec<MessageRow>>
fn sent(&self, agent_id: &str, after_id: i64) -> Result<Vec<MessageRow>>
fn channel_feed(&self, agent_id: &str, after_id: i64) -> Result<Vec<MessageRow>>
fn wire(&self, project_id: &str, after_id: i64) -> Result<Vec<MessageRow>>
Auto Trait Implementations§
impl !Freeze for MockMailboxSource
impl RefUnwindSafe for MockMailboxSource
impl Send for MockMailboxSource
impl Sync for MockMailboxSource
impl Unpin for MockMailboxSource
impl UnsafeUnpin for MockMailboxSource
impl UnwindSafe for MockMailboxSource
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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