Struct FormatCosts
pub struct FormatCosts {
pub format_costs: Option<Vec<FormatCostEntry>>,
/* private fields */
}
Expand description
This is the root of the persistent fidl in a format costs file. The format costs files are read by the assembly tool and merged into the single sysmem_config.persistent_fidl file in the sysmem domain config (see Config above).
Normally json[5] would be preferable for config, but we generate this config in rust using FIDL types (to avoid repetition and to take advantage of FIDL rust codegen), and there’s no json schema for FIDL types.
While the resulting sysmem_config.persistent_fidl is a single file that can contain multiple aspects of sysmem config, in contrast a format costs file contains only format costs. We don’t mind having more separate files during the build, but it’s nice to get sysmem’s domain config down to a single file on-device.
Fields§
§format_costs: Option<Vec<FormatCostEntry>>
This is a chunk of entries that’ll end up in [‘fuchsia.sysmem2.Config.format_costs’] (see above) unless overriden by later entries (either in this same vector or in later-processed files during aggregation by the assembly tool).
Trait Implementations§
§impl Clone for FormatCosts
impl Clone for FormatCosts
§fn clone(&self) -> FormatCosts
fn clone(&self) -> FormatCosts
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for FormatCosts
impl Debug for FormatCosts
§impl<D> Decode<FormatCosts, D> for FormatCostswhere
D: ResourceDialect,
impl<D> Decode<FormatCosts, D> for FormatCostswhere
D: ResourceDialect,
§fn new_empty() -> FormatCosts
fn new_empty() -> FormatCosts
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl Default for FormatCosts
impl Default for FormatCosts
§fn default() -> FormatCosts
fn default() -> FormatCosts
§impl<D> Encode<FormatCosts, D> for &FormatCostswhere
D: ResourceDialect,
impl<D> Encode<FormatCosts, D> for &FormatCostswhere
D: ResourceDialect,
§impl PartialEq for FormatCosts
impl PartialEq for FormatCosts
§impl TypeMarker for FormatCosts
impl TypeMarker for FormatCosts
§type Owned = FormatCosts
type Owned = FormatCosts
§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 FormatCosts
impl ValueTypeMarker for FormatCosts
§type Borrowed<'a> = &'a FormatCosts
type Borrowed<'a> = &'a FormatCosts
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<FormatCosts as TypeMarker>::Owned,
) -> <FormatCosts as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<FormatCosts as TypeMarker>::Owned, ) -> <FormatCosts as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.