pub struct ComponentData {
pub namespace: Option<String>,
pub annotations: Option<Vec<Annotation>>,
/* private fields */
}
Expand description
Data known to a component, but not exposed to the platform, to attach to feedback reports.
Fields§
§namespace: Option<String>
The top-level namespace associated with the data:
- Is intended to group related data together and reduce data key collisions across namespaces.
- May be shared by multiple clients, e.g., there could be multiple clients within the same component or across components that want to expose related data and they would all use the same namespace.
- Will be prefixed to every data key passed within that namespace in all feedback reports, e.g., the annotation “version” would appear as “foo.version” in all feedback reports if the namespace is “foo”.
- Must match [a-z-]+, i.e. only lowercase letters and hyphens or this will result in a ZX_ERR_INVALID_ARGS epitaph.
- Must not match a reserved namespace used internally for platform data, e.g., “build”, or this will result in a ZX_ERR_INVALID_ARGS epitaph. The list of reserved namespaces is internal and subject to change for now.
annotations: Option<Vec<Annotation>>
A vector of key-value string pairs, e.g., <"version", "1.2.3.45">
.
Keys:
- Should be unique as only the latest value for a given key in the vector will be considered.
- Must match [a-z-.]+, i.e. only lowercase letters, hyphens and periods. Use periods for sub-namespacing, e.g., “build.label” and “build.type”, so that related annotations are grouped together (here related to “build”) when sorted lexicographically.
Trait Implementations§
Source§impl Clone for ComponentData
impl Clone for ComponentData
Source§fn clone(&self) -> ComponentData
fn clone(&self) -> ComponentData
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 ComponentData
impl Debug for ComponentData
Source§impl<D: ResourceDialect> Decode<ComponentData, D> for ComponentData
impl<D: ResourceDialect> Decode<ComponentData, D> for ComponentData
Source§impl Default for ComponentData
impl Default for ComponentData
Source§fn default() -> ComponentData
fn default() -> ComponentData
Returns the “default value” for a type. Read more
Source§impl<D: ResourceDialect> Encode<ComponentData, D> for &ComponentData
impl<D: ResourceDialect> Encode<ComponentData, D> for &ComponentData
Source§impl PartialEq for ComponentData
impl PartialEq for ComponentData
Source§impl TypeMarker for ComponentData
impl TypeMarker for ComponentData
Source§type Owned = ComponentData
type Owned = ComponentData
The owned Rust type which this FIDL type decodes into.
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
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
Returns true if the memory layout of
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 ComponentData
impl ValueTypeMarker for ComponentData
Source§type Borrowed<'a> = &'a ComponentData
type Borrowed<'a> = &'a ComponentData
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Persistable for ComponentData
impl StructuralPartialEq for ComponentData
Auto Trait Implementations§
impl Freeze for ComponentData
impl RefUnwindSafe for ComponentData
impl Send for ComponentData
impl Sync for ComponentData
impl Unpin for ComponentData
impl UnwindSafe for ComponentData
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
The marker type to use when the body is at the top-level.
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
The marker type to use when the body is nested in a result union.
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
)