Struct OfferEventStream
pub struct OfferEventStream {
pub source: Option<Ref>,
pub source_name: Option<String>,
pub scope: Option<Vec<Ref>>,
pub target: Option<Ref>,
pub target_name: Option<String>,
pub availability: Option<Availability>,
/* private fields */
}
Expand description
Declares an event stream offered by a component.
Fields§
§source: Option<Ref>
(Required) The provider of the capability relative to the component
itself. Must be parent
, framework
, child
, or void
. If set to
void
, then the target must offer or use the capability with OPTIONAL
or TRANSITIONAL
availability.
source_name: Option<String>
(Required) Name of the event being offered.
scope: Option<Vec<Ref>>
(Optional) When an event is offered from framework, the scope is required and allows one to define the child (or array of children) which the event is about. When the event is offered 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: Option<Ref>
(Required) The destination to which the event stream is offered.
target_name: Option<String>
(Required) Name under which the event stream is being offered.
availability: Option<Availability>
(Optional, defaults to REQUIRED
) The availability of this capability.
If set to required
, the target may use or offer the capability with
either required
or optional
availability. If set to optional
, the
target must use or offer the capability with optional
availability.
The same_as_target
value causes this offer’s availability to match the
availability set in the target.
Trait Implementations§
§impl Clone for OfferEventStream
impl Clone for OfferEventStream
§fn clone(&self) -> OfferEventStream
fn clone(&self) -> OfferEventStream
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for OfferEventStream
impl Debug for OfferEventStream
§impl<D> Decode<OfferEventStream, D> for OfferEventStreamwhere
D: ResourceDialect,
impl<D> Decode<OfferEventStream, D> for OfferEventStreamwhere
D: ResourceDialect,
§fn new_empty() -> OfferEventStream
fn new_empty() -> OfferEventStream
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl Default for OfferEventStream
impl Default for OfferEventStream
§fn default() -> OfferEventStream
fn default() -> OfferEventStream
§impl<D> Encode<OfferEventStream, D> for &OfferEventStreamwhere
D: ResourceDialect,
impl<D> Encode<OfferEventStream, D> for &OfferEventStreamwhere
D: ResourceDialect,
§impl PartialEq for OfferEventStream
impl PartialEq for OfferEventStream
§impl TypeMarker for OfferEventStream
impl TypeMarker for OfferEventStream
§type Owned = OfferEventStream
type Owned = OfferEventStream
§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 OfferEventStream
impl ValueTypeMarker for OfferEventStream
§type Borrowed<'a> = &'a OfferEventStream
type Borrowed<'a> = &'a OfferEventStream
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<OfferEventStream as TypeMarker>::Owned,
) -> <OfferEventStream as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<OfferEventStream as TypeMarker>::Owned, ) -> <OfferEventStream as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.