pub enum AnyPluginEvent<'a, P, A>where
for<'b> P: EventSource + ToBytes + FromBytes<'b> + Debug,
A: EventSource + ToBytes + FromBytes<'a> + Debug,{
Plugin(PluginEvent<P>),
Async(AsyncEvent<'a, A>),
}
Expand description
A generic enum for custom plugin/async event payloads
Type parameters:
P
specifies the payload of thePlugin
variantA
specifies the payload of theAsync
variant
Variants§
Plugin(PluginEvent<P>)
Async(AsyncEvent<'a, A>)
Trait Implementations§
Source§impl<'a, P, A> AnyEventPayload for AnyPluginEvent<'a, P, A>where
for<'b> P: EventSource + ToBytes + FromBytes<'b> + Debug,
A: EventSource + ToBytes + FromBytes<'a> + Debug,
impl<'a, P, A> AnyEventPayload for AnyPluginEvent<'a, P, A>where
for<'b> P: EventSource + ToBytes + FromBytes<'b> + Debug,
A: EventSource + ToBytes + FromBytes<'a> + Debug,
Source§const SOURCES: &'static [Option<&'static str>]
const SOURCES: &'static [Option<&'static str>]
The sources of the events that this payload type can represent.
Source§const EVENT_TYPES: &'static [u16]
const EVENT_TYPES: &'static [u16]
The event types that this payload type can represent.
§fn event_sources() -> Vec<&'static str>
fn event_sources() -> Vec<&'static str>
Get all the event sources for this payload type Read more
Source§impl<'a, P, A> Debug for AnyPluginEvent<'a, P, A>where
for<'b> P: EventSource + ToBytes + FromBytes<'b> + Debug,
A: EventSource + ToBytes + FromBytes<'a> + Debug,
impl<'a, P, A> Debug for AnyPluginEvent<'a, P, A>where
for<'b> P: EventSource + ToBytes + FromBytes<'b> + Debug,
A: EventSource + ToBytes + FromBytes<'a> + Debug,
Source§impl<'raw_event, 'a, P, A> FromRawEvent<'raw_event> for AnyPluginEvent<'a, P, A>where
for<'b> P: EventSource + ToBytes + FromBytes<'b> + Debug,
A: EventSource + ToBytes + FromBytes<'a> + Debug,
'raw_event: 'a,
impl<'raw_event, 'a, P, A> FromRawEvent<'raw_event> for AnyPluginEvent<'a, P, A>where
for<'b> P: EventSource + ToBytes + FromBytes<'b> + Debug,
A: EventSource + ToBytes + FromBytes<'a> + Debug,
'raw_event: 'a,
Source§impl<'a, P, A> PayloadToBytes for AnyPluginEvent<'a, P, A>where
for<'b> P: EventSource + ToBytes + FromBytes<'b> + Debug,
A: EventSource + ToBytes + FromBytes<'a> + Debug,
impl<'a, P, A> PayloadToBytes for AnyPluginEvent<'a, P, A>where
for<'b> P: EventSource + ToBytes + FromBytes<'b> + Debug,
A: EventSource + ToBytes + FromBytes<'a> + Debug,
Auto Trait Implementations§
impl<'a, P, A> Freeze for AnyPluginEvent<'a, P, A>
impl<'a, P, A> RefUnwindSafe for AnyPluginEvent<'a, P, A>where
P: RefUnwindSafe,
A: RefUnwindSafe,
impl<'a, P, A> Send for AnyPluginEvent<'a, P, A>
impl<'a, P, A> Sync for AnyPluginEvent<'a, P, A>
impl<'a, P, A> Unpin for AnyPluginEvent<'a, P, A>
impl<'a, P, A> UnwindSafe for AnyPluginEvent<'a, P, A>where
P: UnwindSafe,
A: UnwindSafe,
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