Struct fidl_fuchsia_feedback::ComponentData
source · 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.
Implementations§
source§impl ComponentData
impl ComponentData
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 Decodable for ComponentData
impl Decodable for ComponentData
source§fn decode(&mut self, decoder: &mut Decoder<'_>, offset: usize) -> Result<()>
fn decode(&mut self, decoder: &mut Decoder<'_>, offset: usize) -> Result<()>
Decodes an object of this type from the decoder’s buffers into
self
.
Callers must ensure that offset
is a multiple of
Layout::inline_align
, and that decoder.buf
has room for reading
Layout::inline_size
bytes at offset
. Read moresource§impl Encodable for ComponentData
impl Encodable for ComponentData
source§fn encode(
&mut self,
encoder: &mut Encoder<'_, '_>,
offset: usize,
recursion_depth: usize
) -> Result<()>
fn encode( &mut self, encoder: &mut Encoder<'_, '_>, offset: usize, recursion_depth: usize ) -> Result<()>
Encode the object into the buffer. Any handles stored in the object are
swapped for
Handle::INVALID
. Callers must ensure that offset
is a
multiple of Layout::inline_align
, and that encoder.buf
has room for
writing Layout::inline_size
bytes at offset
. Read moresource§impl Layout for ComponentData
impl Layout for ComponentData
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 the type’s alignment. Must be a multiple of
inline_align
.§fn supports_simple_copy() -> boolwhere
Self: Sized,
fn supports_simple_copy() -> boolwhere Self: Sized,
Returns true iff the type can be encoded or decoded via simple copy. Read more
source§impl PartialEq<ComponentData> for ComponentData
impl PartialEq<ComponentData> for ComponentData
source§fn eq(&self, other: &ComponentData) -> bool
fn eq(&self, other: &ComponentData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Persistable for ComponentData
impl StructuralPartialEq for ComponentData
impl TopLevel for ComponentData
Auto Trait Implementations§
impl RefUnwindSafe for ComponentData
impl Send for ComponentData
impl Sync for ComponentData
impl Unpin for ComponentData
impl UnwindSafe for ComponentData
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> LayoutObject for Twhere
T: Layout,
impl<T> LayoutObject for Twhere T: Layout,
§fn inline_align(&self, context: &Context) -> usize
fn inline_align(&self, context: &Context) -> usize
See
Layout::inline_align
.§fn inline_size(&self, context: &Context) -> usize
fn inline_size(&self, context: &Context) -> usize
See
Layout::inline_size
.