Struct fidl_fuchsia_component_decl::UseService
source · pub struct UseService {
pub source: Option<Ref>,
pub source_name: Option<String>,
pub target_path: Option<String>,
pub dependency_type: Option<DependencyType>,
pub availability: Option<Availability>,
pub source_dictionary: Option<String>,
/* private fields */
}
Expand description
Declares a service used by a component, which was offered to it.
To learn more about services, see: https://fuchsia.dev/fuchsia-src/glossary#service
Fields§
§source: Option<Ref>
(Required) The provider of the protocol relative to the component
itself. Must be parent
, framework
, self
, or child
.
source_name: Option<String>
(Required) Name identifying the service, by which it was presented to this component.
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 /.
dependency_type: Option<DependencyType>
(Required) The dependency type this use represents.
A component which offers a capability to a child from itself and uses a
capability from the same child, must mark the dependency as weak
. A
weak
dependency implies that the capability may become unavailable at
any point. Taking a strong dependency on a child’s capability will
cause this the child to shut down before its parent. When using a weak
dependency, the parent shuts down before the child.
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.
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.
Trait Implementations§
source§impl Clone for UseService
impl Clone for UseService
source§fn clone(&self) -> UseService
fn clone(&self) -> UseService
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for UseService
impl Debug for UseService
source§impl<D: ResourceDialect> Decode<UseService, D> for UseService
impl<D: ResourceDialect> Decode<UseService, D> for UseService
source§impl Default for UseService
impl Default for UseService
source§fn default() -> UseService
fn default() -> UseService
source§impl<D: ResourceDialect> Encode<UseService, D> for &UseService
impl<D: ResourceDialect> Encode<UseService, D> for &UseService
source§impl PartialEq for UseService
impl PartialEq for UseService
source§fn eq(&self, other: &UseService) -> bool
fn eq(&self, other: &UseService) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl TypeMarker for UseService
impl TypeMarker for UseService
§type Owned = UseService
type Owned = UseService
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 UseService
impl ValueTypeMarker for UseService
§type Borrowed<'a> = &'a UseService
type Borrowed<'a> = &'a UseService
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Persistable for UseService
impl StructuralPartialEq for UseService
Auto Trait Implementations§
impl Freeze for UseService
impl RefUnwindSafe for UseService
impl Send for UseService
impl Sync for UseService
impl Unpin for UseService
impl UnwindSafe for UseService
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)