Improve docs for lazy loading
This commit is contained in:
parent
d476046443
commit
6bfa391104
@ -93,6 +93,8 @@ pub struct RoomEventFilter<'a> {
|
||||
pub url_filter: Option<UrlFilter>,
|
||||
|
||||
/// Options to control lazy-loading of membership events.
|
||||
///
|
||||
/// Defaults to `LazyLoadOptions::Disabled`.
|
||||
#[serde(flatten)]
|
||||
pub lazy_load_options: LazyLoadOptions,
|
||||
}
|
||||
|
@ -29,6 +29,13 @@ impl LazyLoadOptions {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for LazyLoadOptions {
|
||||
/// `LazyLoadOptions::Disabled`
|
||||
fn default() -> Self {
|
||||
Self::Disabled
|
||||
}
|
||||
}
|
||||
|
||||
impl Serialize for LazyLoadOptions {
|
||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where
|
||||
@ -53,12 +60,6 @@ impl Serialize for LazyLoadOptions {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for LazyLoadOptions {
|
||||
fn default() -> Self {
|
||||
Self::Disabled
|
||||
}
|
||||
}
|
||||
|
||||
struct LazyLoadOptionsVisitor;
|
||||
|
||||
impl<'de> Visitor<'de> for LazyLoadOptionsVisitor {
|
||||
|
Loading…
x
Reference in New Issue
Block a user