pub struct LongPollingServiceContextBuilder { /* private fields */ }Expand description
A builder to construct LongPoolingServiceContext.
Implementations§
Source§impl LongPollingServiceContextBuilder
impl LongPollingServiceContextBuilder
Sourcepub fn build<AdditionalData, CustomData>(
self,
) -> Arc<LongPollingServiceContext<AdditionalData, CustomData>>
pub fn build<AdditionalData, CustomData>( self, ) -> Arc<LongPollingServiceContext<AdditionalData, CustomData>>
Return a LongPoolingServiceContextBuilder.
§Example
use axum_cometd::LongPollingServiceContextBuilder;
let context = LongPollingServiceContextBuilder::new().build::<(), ()>();Sourcepub fn interval_ms(self, _interval_ms: u64) -> Self
pub fn interval_ms(self, _interval_ms: u64) -> Self
Set timeout, that the client must wait between two connects.
Sourcepub const fn max_interval(self, max_interval: Duration) -> Self
pub const fn max_interval(self, max_interval: Duration) -> Self
Set timeout, which server wait between erase clientId.
Sourcepub const fn events_channel_capacity(self, capacity: usize) -> Self
pub const fn events_channel_capacity(self, capacity: usize) -> Self
Set capacity of event channel.
Sourcepub const fn client_channel_capacity(self, capacity: usize) -> Self
pub const fn client_channel_capacity(self, capacity: usize) -> Self
Set capacity of internal client channels.
Sourcepub const fn client_storage_capacity(self, capacity: usize) -> Self
pub const fn client_storage_capacity(self, capacity: usize) -> Self
Set capacity of internal client channels storage.
Sourcepub const fn subscription_channel_capacity(self, capacity: usize) -> Self
pub const fn subscription_channel_capacity(self, capacity: usize) -> Self
Set capacity of internal subscription channels.
Sourcepub const fn subscription_storage_capacity(self, capacity: usize) -> Self
pub const fn subscription_storage_capacity(self, capacity: usize) -> Self
Set capacity of internal subscription channels storage.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LongPollingServiceContextBuilder
impl RefUnwindSafe for LongPollingServiceContextBuilder
impl Send for LongPollingServiceContextBuilder
impl Sync for LongPollingServiceContextBuilder
impl Unpin for LongPollingServiceContextBuilder
impl UnwindSafe for LongPollingServiceContextBuilder
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