pub struct EventContent {
pub program_id: ProgramId,
pub event_name: Option<String>,
pub priority: Priority,
pub targets: Option<TargetMap>,
pub report_descriptors: Option<Vec<ReportDescriptor>>,
pub payload_descriptors: Option<Vec<EventPayloadDescriptor>>,
pub interval_period: Option<IntervalPeriod>,
pub intervals: Vec<EventInterval>,
}Fields§
§program_id: ProgramIdURL safe VTN assigned object ID.
event_name: Option<String>User defined string for use in debugging or User Interface.
priority: PriorityRelative priority of event. A lower number is a higher priority.
targets: Option<TargetMap>A list of valuesMap objects.
report_descriptors: Option<Vec<ReportDescriptor>>A list of reportDescriptor objects. Used to request reports from VEN.
payload_descriptors: Option<Vec<EventPayloadDescriptor>>A list of payloadDescriptor objects.
interval_period: Option<IntervalPeriod>Defines default start and durations of intervals.
intervals: Vec<EventInterval>A list of interval objects.
Implementations§
Source§impl EventContent
impl EventContent
pub fn new(program_id: ProgramId, intervals: Vec<EventInterval>) -> Self
pub fn with_event_name(self, event_name: impl ToString) -> Self
pub fn with_priority(self, priority: Priority) -> Self
pub fn with_targets(self, targets: TargetMap) -> Self
pub fn with_report_descriptors( self, report_descriptors: Vec<ReportDescriptor>, ) -> Self
pub fn with_payload_descriptors( self, payload_descriptors: Vec<EventPayloadDescriptor>, ) -> Self
pub fn with_interval_period(self, interval_period: IntervalPeriod) -> Self
pub fn with_intervals(self, intervals: Vec<EventInterval>) -> Self
Trait Implementations§
Source§impl Clone for EventContent
impl Clone for EventContent
Source§fn clone(&self) -> EventContent
fn clone(&self) -> EventContent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EventContent
impl Debug for EventContent
Source§impl<'de> Deserialize<'de> for EventContent
impl<'de> Deserialize<'de> for EventContent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for EventContent
impl PartialEq for EventContent
Source§impl Serialize for EventContent
impl Serialize for EventContent
Source§impl Validate for EventContent
impl Validate for EventContent
Source§impl<'v_a> ValidateArgs<'v_a> for EventContent
impl<'v_a> ValidateArgs<'v_a> for EventContent
impl StructuralPartialEq for EventContent
Auto Trait Implementations§
impl Freeze for EventContent
impl RefUnwindSafe for EventContent
impl Send for EventContent
impl Sync for EventContent
impl Unpin for EventContent
impl UnwindSafe for EventContent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)