#[non_exhaustive]pub enum DeployReservationDeviceOptions {
Map {
span: SourceSpan,
entries: Vec<KeyValueEntry>,
unmodeled_entries: Vec<FieldReference>,
},
List {
span: SourceSpan,
items: Vec<DeployReservationDeviceOptionItem>,
},
}Expand description
Schema-shaped resource-reservation device options retaining map or list syntax.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Map
Ordered mapping entries plus malformed or duplicate fields retained as evidence.
Fields
§
span: SourceSpanComplete mapping span.
§
entries: Vec<KeyValueEntry>Valid non-empty strict-string keyed scalar entries.
§
unmodeled_entries: Vec<FieldReference>Malformed or duplicate mapping fields.
List
Ordered list entries, including malformed entries.
Fields
§
span: SourceSpanComplete sequence span.
§
items: Vec<DeployReservationDeviceOptionItem>Items in authored order.
Implementations§
Source§impl DeployReservationDeviceOptions
impl DeployReservationDeviceOptions
Sourcepub const fn span(&self) -> SourceSpan
pub const fn span(&self) -> SourceSpan
Returns the complete authored collection span.
Sourcepub fn as_map(&self) -> Option<&[KeyValueEntry]>
pub fn as_map(&self) -> Option<&[KeyValueEntry]>
Returns valid map entries when the authored form was a mapping.
Sourcepub fn unmodeled_entries(&self) -> Option<&[FieldReference]>
pub fn unmodeled_entries(&self) -> Option<&[FieldReference]>
Returns malformed or duplicate map fields when the authored form was a mapping.
Sourcepub fn as_list(&self) -> Option<&[DeployReservationDeviceOptionItem]>
pub fn as_list(&self) -> Option<&[DeployReservationDeviceOptionItem]>
Returns ordered list entries when the authored form was a sequence.
Trait Implementations§
Source§impl Clone for DeployReservationDeviceOptions
impl Clone for DeployReservationDeviceOptions
Source§fn clone(&self) -> DeployReservationDeviceOptions
fn clone(&self) -> DeployReservationDeviceOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Eq for DeployReservationDeviceOptions
impl StructuralPartialEq for DeployReservationDeviceOptions
Auto Trait Implementations§
impl Freeze for DeployReservationDeviceOptions
impl RefUnwindSafe for DeployReservationDeviceOptions
impl Send for DeployReservationDeviceOptions
impl Sync for DeployReservationDeviceOptions
impl Unpin for DeployReservationDeviceOptions
impl UnsafeUnpin for DeployReservationDeviceOptions
impl UnwindSafe for DeployReservationDeviceOptions
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