pub struct InMemoryQueue { /* private fields */ }Implementations§
Source§impl InMemoryQueue
impl InMemoryQueue
pub fn new() -> Self
pub fn with_limit(max_queue_size: usize) -> Self
Trait Implementations§
Source§impl Default for InMemoryQueue
impl Default for InMemoryQueue
Source§impl MessageQueue for InMemoryQueue
impl MessageQueue for InMemoryQueue
fn push<'life0, 'life1, 'async_trait>(
&'life0 self,
vtoken: &'life1 str,
msg: WeixinMessage,
) -> Pin<Box<dyn Future<Output = Result<bool, HubError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Optimised push for the broadcast path: the base message is shared via
Arc<WeixinMessage> and only the per-recipient context_token and
ilink_hub_ext are supplied separately. The base clone cost drops from
O(N × msg_size) to O(msg_size) + N × cheap field clone, which matters
when many backends are online and a message carries images / files. Read morefn drain<'life0, 'life1, 'async_trait>(
&'life0 self,
vtoken: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<WeixinMessage>, HubError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn wait_notify<'life0, 'life1, 'async_trait>(
&'life0 self,
vtoken: &'life1 str,
timeout_secs: u64,
) -> Pin<Box<dyn Future<Output = Result<bool, HubError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_client<'life0, 'life1, 'async_trait>(
&'life0 self,
vtoken: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), HubError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn queue_sizes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, usize>, HubError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for InMemoryQueue
impl Freeze for InMemoryQueue
impl Send for InMemoryQueue
impl Sync for InMemoryQueue
impl Unpin for InMemoryQueue
impl UnsafeUnpin for InMemoryQueue
impl UnwindSafe for InMemoryQueue
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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