pub struct MockClient { /* private fields */ }Expand description
In-memory event queue implementing EventSource.
Implementations§
Source§impl MockClient
impl MockClient
Sourcepub fn push(&mut self, event: Event, message: Message) -> &mut Self
pub fn push(&mut self, event: Event, message: Message) -> &mut Self
Pushes a raw event and message pair.
Sourcepub fn push_event(&mut self, event: Event) -> &mut Self
pub fn push_event(&mut self, event: Event) -> &mut Self
Pushes an event with an empty message.
Sourcepub fn push_user_joined(&mut self, user: MockUserBuilder) -> &mut Self
pub fn push_user_joined(&mut self, user: MockUserBuilder) -> &mut Self
Pushes a UserJoined event.
Sourcepub fn push_user_update(&mut self, user: MockUserBuilder) -> &mut Self
pub fn push_user_update(&mut self, user: MockUserBuilder) -> &mut Self
Pushes a UserUpdate event.
Sourcepub fn push_text_message(&mut self, message: Message) -> &mut Self
pub fn push_text_message(&mut self, message: Message) -> &mut Self
Pushes a TextMessage event.
Trait Implementations§
Source§impl Default for MockClient
impl Default for MockClient
Auto Trait Implementations§
impl Freeze for MockClient
impl RefUnwindSafe for MockClient
impl Send for MockClient
impl Sync for MockClient
impl Unpin for MockClient
impl UnwindSafe for MockClient
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