pub struct Groups(/* private fields */);Expand description
Collection of groups keyed by name.
This type wraps a CustomTreeMap<Group> and is the primary container used
for group inventory data. The map keys are group names.
§Deserialization
- Unknown fields in individual
Groupentries are rejected (via#[serde(deny_unknown_fields)]onGroup) - The
Groupswrapper itself accepts any valid map structure
§Examples
use genja_core::inventory::{Group, Groups, BaseBuilderHost};
let mut groups = Groups::new();
let core_group = Group::builder().platform("linux").build();
groups.add_group("core", core_group);
assert_eq!(groups.len(), 1);Implementations§
Trait Implementations§
Source§impl DerefTarget for Groups
impl DerefTarget for Groups
type Target = CustomTreeMap<Group>
Source§impl<'de> Deserialize<'de> for Groups
impl<'de> Deserialize<'de> for Groups
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for Groups
impl JsonSchema for Groups
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for Groups
impl RefUnwindSafe for Groups
impl Send for Groups
impl Sync for Groups
impl Unpin for Groups
impl UnsafeUnpin for Groups
impl UnwindSafe for Groups
Blanket Implementations§
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