pub struct State {
pub feed_manager: FeedManager,
pub db_manager: CouchManager,
pub db: CouchDB,
pub index_manager: IndexManager,
pub jobs: JobManager,
/* private fields */
}
Expand description
Main application state.
This struct has instances to the mostly stateless clients to other services (CouchDB, Elasticsearch). It should be cheap clone.
Fields
feed_manager: FeedManager
db_manager: CouchManager
db: CouchDB
index_manager: IndexManager
jobs: JobManager
Implementations
sourceimpl State
impl State
pub fn new(
db_manager: CouchManager,
db: CouchDB,
index_manager: IndexManager,
feed_manager: FeedManager,
jobs: JobManager
) -> Self
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl !UnwindSafe for State
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
Converts
self
into a collection.fn mapped<U, F, A>(self, f: F) -> SmallVec<A>where
F: FnMut(T) -> U,
A: Array<Item = U>,
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be
Self