pub struct UnknownProperty {
pub value: UnknownValue,
pub ty: Option<String>,
}Expand description
A typed KDL value retained for an unrecognized property (forward-compat).
Storing the full UnknownValue variant keeps the AST lossless for
round-trip: a boolean magic=#true round-trips back as a boolean, not
as the string "true". Any KDL type annotation on the value (e.g. px
from (px)10) is retained in ty so annotated values round-trip
byte-identically.
Fields§
§value: UnknownValueThe typed representation of the KDL value.
ty: Option<String>The KDL type annotation, if any (e.g. px from (px)10, token from
(token)"color.navy"). Preserved so annotated values round-trip losslessly.
Trait Implementations§
Source§impl Clone for UnknownProperty
impl Clone for UnknownProperty
Source§fn clone(&self) -> UnknownProperty
fn clone(&self) -> UnknownProperty
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 moreSource§impl Debug for UnknownProperty
impl Debug for UnknownProperty
Source§impl PartialEq for UnknownProperty
impl PartialEq for UnknownProperty
Source§fn eq(&self, other: &UnknownProperty) -> bool
fn eq(&self, other: &UnknownProperty) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for UnknownProperty
Auto Trait Implementations§
impl Freeze for UnknownProperty
impl RefUnwindSafe for UnknownProperty
impl Send for UnknownProperty
impl Sync for UnknownProperty
impl Unpin for UnknownProperty
impl UnsafeUnpin for UnknownProperty
impl UnwindSafe for UnknownProperty
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