pub struct PortableExtensions(/* private fields */);Expand description
The forward-compatibility bag: top-level keys this build does not interpret.
A newtype over a JSON value map, rather than a bare Map, so the write path goes
through PortableExtensions::insert and a key that would collide with a
document field is refused by name instead of producing a document that cannot be
read back. A JSON map (not toml::Table) because TOML has no null: a newer build
writing "future": null must survive a round trip through this one, and a TOML
value cannot hold a null at all.
The map is sorted (the preserve_order feature is off), so key order is
normalised — the values are what the round trip preserves.
Implementations§
Source§impl PortableExtensions
impl PortableExtensions
Sourcepub fn contains_key(&self, key: &str) -> bool
pub fn contains_key(&self, key: &str) -> bool
Whether a preserved key is present.
Trait Implementations§
Source§impl Clone for PortableExtensions
impl Clone for PortableExtensions
Source§impl Debug for PortableExtensions
impl Debug for PortableExtensions
Source§impl Default for PortableExtensions
impl Default for PortableExtensions
Source§impl<'de> Deserialize<'de> for PortableExtensions
impl<'de> Deserialize<'de> for PortableExtensions
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 PartialEq for PortableExtensions
impl PartialEq for PortableExtensions
Source§impl Serialize for PortableExtensions
impl Serialize for PortableExtensions
impl StructuralPartialEq for PortableExtensions
Auto Trait Implementations§
impl Freeze for PortableExtensions
impl RefUnwindSafe for PortableExtensions
impl Send for PortableExtensions
impl Sync for PortableExtensions
impl Unpin for PortableExtensions
impl UnsafeUnpin for PortableExtensions
impl UnwindSafe for PortableExtensions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more