serde_yml::mapping

Trait Index

Source
pub trait Index: Sealed { }
Expand description

A trait for types that can be used to index into a serde_yml::Mapping.

The get, get_mut, contains_key, remove, remove_entry, shift_remove and shift_remove_entry methods of Mapping use this trait to provide a uniform interface for indexing with different key types.

This trait is sealed and cannot be implemented for types outside of serde_yml.

Implementations on Foreign Types§

Source§

impl Index for str

Implements the Index trait for &str, allowing string slices to be used as keys for indexing into a Mapping.

Source§

impl Index for String

Implements the Index trait for String, allowing owned strings to be used as keys for indexing into a Mapping.

Source§

impl<T> Index for &T
where T: ?Sized + Index,

Implements the Index trait for &String, allowing string references to be used as keys for indexing into a Mapping.

Implementors§

Source§

impl Index for Value

Implements the Index trait for Value, allowing any Value to be used as a key for indexing into a Mapping.