[−][src]Struct eventually::Projector
A Projector
manages the state of a single Projection
by opening a long-running stream of all events coming from the EventStore
.
New instances of a Projector
are obtainable through a ProjectorBuilder
instance.
The Projector
will start updating the Projection
state when run
is called.
At each update, the Projector
will broadcast the latest version of the
Projection
on a Stream
obtainable through watch
.
Implementations
impl<P, S> Projector<P, S> where
P: Projection,
S: Subscription<SourceId = <P as Projection>::SourceId, Event = <P as Projection>::Event>,
<P as Projection>::SourceId: Debug,
<P as Projection>::Event: Debug,
<P as Projection>::Error: Error,
<P as Projection>::Error: Send,
<P as Projection>::Error: Sync,
<P as Projection>::Error: 'static,
<S as Subscription>::Error: Error,
<S as Subscription>::Error: Send,
<S as Subscription>::Error: Sync,
<S as Subscription>::Error: 'static,
[src]
P: Projection,
S: Subscription<SourceId = <P as Projection>::SourceId, Event = <P as Projection>::Event>,
<P as Projection>::SourceId: Debug,
<P as Projection>::Event: Debug,
<P as Projection>::Error: Error,
<P as Projection>::Error: Send,
<P as Projection>::Error: Sync,
<P as Projection>::Error: 'static,
<S as Subscription>::Error: Error,
<S as Subscription>::Error: Send,
<S as Subscription>::Error: Sync,
<S as Subscription>::Error: 'static,
pub fn new(projection: Arc<RwLock<P>>, subscription: S) -> Projector<P, S>
[src]
Create a new Projector from the provided Projection
and
Subscription
values.
pub async fn run(&'_ mut self) -> Result<(), Error>
[src]
Starts the update of the Projection
by processing all the events
coming from the EventStore
.
Auto Trait Implementations
impl<P, S> !RefUnwindSafe for Projector<P, S>
impl<P, S> Send for Projector<P, S> where
P: Send + Sync,
S: Send,
P: Send + Sync,
S: Send,
impl<P, S> Sync for Projector<P, S> where
P: Send + Sync,
S: Sync,
P: Send + Sync,
S: Sync,
impl<P, S> Unpin for Projector<P, S> where
S: Unpin,
S: Unpin,
impl<P, S> !UnwindSafe for Projector<P, S>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,