pub enum Event {
UserCreated(User),
UserUpdated(User),
UserDeleted(UserId),
SessionCreated(UserId, Session),
SessionDeleted(UserId, SessionToken),
SessionsCleared(UserId),
}Expand description
Represents events that can be emitted by the event bus
Events are used to notify interested parties about changes in the system state. This includes user-related events (creation, updates, deletion) and session-related events (creation, deletion).
All events contain the relevant data needed to handle the event, such as the affected User or Session objects.
Variants§
UserCreated(User)
UserUpdated(User)
UserDeleted(UserId)
SessionCreated(UserId, Session)
SessionDeleted(UserId, SessionToken)
SessionsCleared(UserId)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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