pub trait ServiceState {
// Required methods
fn nid(&self) -> &NodeId;
fn sessions(&self) -> &Sessions;
fn fetching(&self) -> &HashMap<RepoId, FetchState>;
fn outbox(&self) -> &Outbox ⓘ;
fn limiter(&self) -> &RateLimiter;
fn emitter(&self) -> &Emitter<Event>;
fn get(&self, rid: RepoId) -> Result<Option<Doc>, RepositoryError>;
fn clock(&self) -> &LocalTime;
fn clock_mut(&mut self) -> &mut LocalTime;
fn config(&self) -> &Config;
fn metrics(&self) -> &Metrics;
}Expand description
Gives read access to the service state.
Required Methods§
Sourcefn fetching(&self) -> &HashMap<RepoId, FetchState>
fn fetching(&self) -> &HashMap<RepoId, FetchState>
Get fetch state.
Sourcefn limiter(&self) -> &RateLimiter
fn limiter(&self) -> &RateLimiter
Get rate limiter.