pub struct BusEvent(pub Value);Expand description
A parsed NOTIFY payload. Kept as loose JSON plus typed accessors so adding fields to the triggers never breaks older consumers.
Tuple Fields§
§0: ValueImplementations§
Source§impl BusEvent
impl BusEvent
pub fn kind(&self) -> &str
pub fn team_id(&self) -> Option<Uuid>
pub fn recipient_agent_id(&self) -> Option<Uuid>
pub fn sender_agent_id(&self) -> Option<Uuid>
pub fn channel_id(&self) -> Option<Uuid>
pub fn message_id(&self) -> Option<i64>
pub fn is_direct_message(&self) -> bool
Sourcepub fn visible_to(&self, team_id: Uuid, agent_id: Uuid) -> bool
pub fn visible_to(&self, team_id: Uuid, agent_id: Uuid) -> bool
Is this event visible to agent of team? Direct messages are only
visible to their recipient (and sender); everything else is team-wide.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BusEvent
impl RefUnwindSafe for BusEvent
impl Send for BusEvent
impl Sync for BusEvent
impl Unpin for BusEvent
impl UnsafeUnpin for BusEvent
impl UnwindSafe for BusEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more