use chrono::{DateTime, Utc};
#[non_exhaustive]
#[derive(Debug, Clone, Default)]
pub struct LoadOptions {
pub last_n_entries: Option<usize>,
pub after_timestamp: Option<DateTime<Utc>>,
pub entry_types: Option<Vec<String>>,
}
impl LoadOptions {
#[must_use]
pub fn new() -> Self {
Self::default()
}
#[must_use]
pub fn with_last_n_entries(mut self, last_n_entries: usize) -> Self {
self.last_n_entries = Some(last_n_entries);
self
}
#[must_use]
pub fn with_after_timestamp(mut self, after_timestamp: DateTime<Utc>) -> Self {
self.after_timestamp = Some(after_timestamp);
self
}
#[must_use]
pub fn with_entry_types(mut self, entry_types: Vec<String>) -> Self {
self.entry_types = Some(entry_types);
self
}
}
const _: () = {
const fn assert_send_sync<T: Send + Sync>() {}
assert_send_sync::<LoadOptions>();
};