pub struct EventDefinition {Show 16 fields
pub id: u64,
pub name: String,
pub namespace: String,
pub params: Vec<EventParam>,
pub priority: EventPriority,
pub dispatch_mode: EventDispatchMode,
pub category: String,
pub description: String,
pub cancelable: bool,
pub persistent: bool,
pub one_shot: bool,
pub max_listeners: Option<u32>,
pub ttl_ms: Option<u32>,
pub tags: Vec<String>,
pub deprecated: bool,
pub version: u32,
}Fields§
§id: u64§name: String§namespace: String§params: Vec<EventParam>§priority: EventPriority§dispatch_mode: EventDispatchMode§category: String§description: String§cancelable: bool§persistent: bool§one_shot: bool§max_listeners: Option<u32>§ttl_ms: Option<u32>§deprecated: bool§version: u32Implementations§
Source§impl EventDefinition
impl EventDefinition
pub fn new(id: u64, name: &str) -> Self
pub fn with_param(self, param: EventParam) -> Self
pub fn with_priority(self, priority: EventPriority) -> Self
pub fn with_mode(self, mode: EventDispatchMode) -> Self
pub fn cancelable(self) -> Self
pub fn persistent(self) -> Self
pub fn with_category(self, cat: &str) -> Self
pub fn full_name(&self) -> String
pub fn payload_size_bytes(&self) -> usize
Trait Implementations§
Source§impl Clone for EventDefinition
impl Clone for EventDefinition
Auto Trait Implementations§
impl Freeze for EventDefinition
impl RefUnwindSafe for EventDefinition
impl Send for EventDefinition
impl Sync for EventDefinition
impl Unpin for EventDefinition
impl UnsafeUnpin for EventDefinition
impl UnwindSafe for EventDefinition
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.