pub struct EventCacheConfig {
pub max_pinned_events_concurrent_requests: usize,
pub max_pinned_events_to_load: usize,
pub experimental_auto_backpagination: bool,
pub room_pagination_per_room_credit: usize,
pub room_pagination_batch_size: u16,
}Expand description
Global configuration for the EventCache, applied to every single room.
Fields§
§max_pinned_events_concurrent_requests: usizeMaximum number of concurrent /event requests when loading pinned events.
max_pinned_events_to_load: usizeMaximum number of pinned events to load, for any room.
experimental_auto_backpagination: boolWhether to automatically backpaginate a room under certain conditions.
Off by default.
room_pagination_per_room_credit: usizeThe maximum number of allowed room paginations, for a given room, that can be executed in the automatic paginations task.
After that number of paginations, the task will stop executing paginations for that room in the background (user-requested paginations will still be executed, of course).
Defaults to EventCacheConfig::DEFAULT_ROOM_PAGINATION_CREDITS.
room_pagination_batch_size: u16The number of messages to paginate in a single batch, when executing an automatic pagination request.
Defaults to EventCacheConfig::DEFAULT_ROOM_PAGINATION_BATCH_SIZE.
Implementations§
Source§impl EventCacheConfig
impl EventCacheConfig
Sourcepub const DEFAULT_MAX_EVENTS_TO_LOAD: usize = 128
pub const DEFAULT_MAX_EVENTS_TO_LOAD: usize = 128
The default maximum number of pinned events to load.
Sourcepub const DEFAULT_MAX_CONCURRENT_REQUESTS: usize = 8
pub const DEFAULT_MAX_CONCURRENT_REQUESTS: usize = 8
The default maximum number of concurrent requests to perform when loading the pinned events.
Sourcepub const DEFAULT_ROOM_PAGINATION_CREDITS: usize = 20
pub const DEFAULT_ROOM_PAGINATION_CREDITS: usize = 20
The default number of credits to give to a room for automatic
paginations (see also
EventCacheConfig::room_pagination_per_room_credit).
Sourcepub const DEFAULT_ROOM_PAGINATION_BATCH_SIZE: u16 = 30
pub const DEFAULT_ROOM_PAGINATION_BATCH_SIZE: u16 = 30
The default number of messages to paginate in a single batch, when
executing an automatic pagination request (see also
EventCacheConfig::room_pagination_batch_size).
Trait Implementations§
Source§impl Clone for EventCacheConfig
impl Clone for EventCacheConfig
Source§fn clone(&self) -> EventCacheConfig
fn clone(&self) -> EventCacheConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EventCacheConfig
impl Debug for EventCacheConfig
Source§impl Default for EventCacheConfig
impl Default for EventCacheConfig
impl Copy for EventCacheConfig
Auto Trait Implementations§
impl Freeze for EventCacheConfig
impl RefUnwindSafe for EventCacheConfig
impl Send for EventCacheConfig
impl Sync for EventCacheConfig
impl Unpin for EventCacheConfig
impl UnsafeUnpin for EventCacheConfig
impl UnwindSafe for EventCacheConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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