pub struct OfferService {
pub source: Option<Ref>,
pub source_name: Option<String>,
pub target: Option<Ref>,
pub target_name: Option<String>,
pub source_instance_filter: Option<Vec<String>>,
pub renamed_instances: Option<Vec<NameMapping>>,
pub availability: Option<Availability>,
pub source_dictionary: Option<String>,
pub dependency_type: Option<DependencyType>,
/* private fields */
}
Expand description
Declares a service offered by a component to one of its children, which may have been offered by the component’s containing realm, the component itself, or one of its other children.
To learn more about services, see: https://fuchsia.dev/fuchsia-src/glossary#service
Fields§
§source: Option<Ref>
(Required) The provider of the capability relative to the component
itself. Must be parent
, self
, 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 identifying the service being offered.
target: Option<Ref>
(Required) Reference to the target. Must be child
, collection
, or
a dictionary capability
.
target_name: Option<String>
(Required) The name under which the capability is being offered.
source_instance_filter: Option<Vec<String>>
(Optional) The list of allowlisted instances to be offered. Instances of the service not in this list will not be accessible by the target component. If this is not set that means all instances from the source service are offered.
renamed_instances: Option<Vec<NameMapping>>
(Optional) The list of allowlisted instances to be offered, with renames.
If this is set and nonempty, the set of instances in the target service
will be restricted to the instances in this list, renaming source_name
to target_name
.
If it is set and nonempty, source_instance_filter
will further
restrict the set of instances to those whose target_name
appears in
that list. There is generally no reason to set both, but we support it
for compatibility.
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.
source_dictionary: Option<String>
(Optional) Path in a dictionary provided by source
which contains source_name
.
If this field is absent, source_name
identifies a capability directly routed
by source
. If set, source_name
identifies a capability nested inside this
dictionary.
dependency_type: Option<DependencyType>
(Optional, defaults to STRONG
) The dependency type this offer represents.
A component which receives a weak offer must support the offered capability being
unavailable at any point.
Trait Implementations§
Source§impl Clone for OfferService
impl Clone for OfferService
Source§fn clone(&self) -> OfferService
fn clone(&self) -> OfferService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for OfferService
impl Debug for OfferService
Source§impl<D: ResourceDialect> Decode<OfferService, D> for OfferService
impl<D: ResourceDialect> Decode<OfferService, D> for OfferService
Source§impl Default for OfferService
impl Default for OfferService
Source§fn default() -> OfferService
fn default() -> OfferService
Source§impl<D: ResourceDialect> Encode<OfferService, D> for &OfferService
impl<D: ResourceDialect> Encode<OfferService, D> for &OfferService
Source§impl PartialEq for OfferService
impl PartialEq for OfferService
Source§impl TypeMarker for OfferService
impl TypeMarker for OfferService
Source§type Owned = OfferService
type Owned = OfferService
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§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.Source§impl ValueTypeMarker for OfferService
impl ValueTypeMarker for OfferService
Source§type Borrowed<'a> = &'a OfferService
type Borrowed<'a> = &'a OfferService
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Persistable for OfferService
impl StructuralPartialEq for OfferService
Auto Trait Implementations§
impl Freeze for OfferService
impl RefUnwindSafe for OfferService
impl Send for OfferService
impl Sync for OfferService
impl Unpin for OfferService
impl UnwindSafe for OfferService
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
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
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)
clone_to_uninit
)