pub struct AttributionServer { /* private fields */ }
Implementations§
Source§impl AttributionServer
impl AttributionServer
Sourcepub fn new(
state: Box<dyn Fn() -> Vec<AttributionUpdate> + Send>,
) -> AttributionServerHandle
pub fn new( state: Box<dyn Fn() -> Vec<AttributionUpdate> + Send>, ) -> AttributionServerHandle
Create a new memory attribution server.
state
is a function returning the complete attribution state (not partial updates).
pub fn on_update(&mut self, updates: Vec<AttributionUpdate>)
Sourcepub fn next(&mut self, responder: ProviderGetResponder)
pub fn next(&mut self, responder: ProviderGetResponder)
Get the next attribution state.
pub fn register( inner: &Arc<Mutex<Self>>, control_handle: ProviderControlHandle, ) -> Observer
Sourcepub fn unregister(&mut self, key: Key)
pub fn unregister(&mut self, key: Key)
Deregister the current observer. No observer can be registered as long as another observer is already registered.
Auto Trait Implementations§
impl Freeze for AttributionServer
impl !RefUnwindSafe for AttributionServer
impl Send for AttributionServer
impl !Sync for AttributionServer
impl Unpin for AttributionServer
impl !UnwindSafe for AttributionServer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more