pub(crate) struct JsonProperty {
pub tag: String,
pub args: Vec<String>,
pub kind: Option<String>,
pub any: Option<Vec<AnyItem>>,
}Expand description
Structure of JSON entries.
When the any field is present, the entry represents a disjunction (logical
OR) of property groups. Each element in any is either a single
JsonProperty (one disjunct) or an array of entries (a conjunction group —
all must hold).
JSON format for any (flat OR):
{
"any": [
{"tag": "Trait", "args": ["T", "Copy"]},
{"tag": "Alias", "args": ["T", "return"]}
]
}JSON format for any with conjunction group (null-guard):
{
"any": [
{"tag": "Null", "args": ["head"]},
[
{"tag": "Align", "args": ["head", "Node"]},
{"tag": "ValidPtr", "args": ["head", "Node", "1"]}
]
]
}Fields§
§tag: String§args: Vec<String>§kind: Option<String>§any: Option<Vec<AnyItem>>The list of disjuncts (OR alternatives) when this entry is a disjunction. Each element is either a single entry or a conjunction group.
Trait Implementations§
Source§impl Clone for JsonProperty
impl Clone for JsonProperty
Source§impl Debug for JsonProperty
impl Debug for JsonProperty
Source§impl<'de> Deserialize<'de> for JsonProperty
impl<'de> Deserialize<'de> for JsonProperty
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
Auto Trait Implementations§
impl DynSend for JsonProperty
impl DynSync for JsonProperty
impl Freeze for JsonProperty
impl RefUnwindSafe for JsonProperty
impl Send for JsonProperty
impl Sync for JsonProperty
impl Unpin for JsonProperty
impl UnsafeUnpin for JsonProperty
impl UnwindSafe for JsonProperty
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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