Struct UseEventStream
pub struct UseEventStream {
pub source_name: Option<String>,
pub source: Option<Ref>,
pub scope: Option<Vec<Ref>>,
pub target_path: Option<String>,
pub availability: Option<Availability>,
pub filter: Option<Dictionary>,
/* private fields */
}
Expand description
Declares an EventStream used by a component.
Fields§
§source_name: Option<String>
(Required) The names of the event streams.
source: Option<Ref>
(Required) The provider of the event. Must be parent
, framework
, or child
.
scope: Option<Vec<Ref>>
(Optional) When an event is used from framework, the scope is required to specify the child (or array of children) which the event will be about. When the event is used from parent, the scope can be used to downscope the event to a certain child scope, otherwise the event will carry the scope coming from the parent.
target_path: Option<String>
(Required) The path where the capability should be installed in the component’s namespace. Must be an absolute path starting with /.
availability: Option<Availability>
(Optional, defaults to REQUIRED
) The availability of this capability.
If set to required
, the component is likely to malfunction if this
capability is not provided. If set to optional
, the component can
handle the capability’s absence.
filter: Option<Dictionary>
(Optional) Filter for the event stream. The structure of the filter
depends on the event stream type. Only supported for the
CapabilityRequested
event type.
Trait Implementations§
§impl Clone for UseEventStream
impl Clone for UseEventStream
§fn clone(&self) -> UseEventStream
fn clone(&self) -> UseEventStream
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for UseEventStream
impl Debug for UseEventStream
§impl<D> Decode<UseEventStream, D> for UseEventStreamwhere
D: ResourceDialect,
impl<D> Decode<UseEventStream, D> for UseEventStreamwhere
D: ResourceDialect,
§fn new_empty() -> UseEventStream
fn new_empty() -> UseEventStream
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl Default for UseEventStream
impl Default for UseEventStream
§fn default() -> UseEventStream
fn default() -> UseEventStream
§impl<D> Encode<UseEventStream, D> for &UseEventStreamwhere
D: ResourceDialect,
impl<D> Encode<UseEventStream, D> for &UseEventStreamwhere
D: ResourceDialect,
§impl PartialEq for UseEventStream
impl PartialEq for UseEventStream
§impl TypeMarker for UseEventStream
impl TypeMarker for UseEventStream
§type Owned = UseEventStream
type Owned = UseEventStream
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for UseEventStream
impl ValueTypeMarker for UseEventStream
§type Borrowed<'a> = &'a UseEventStream
type Borrowed<'a> = &'a UseEventStream
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<UseEventStream as TypeMarker>::Owned,
) -> <UseEventStream as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<UseEventStream as TypeMarker>::Owned, ) -> <UseEventStream as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.