pub struct TypeDefinitionCommon {
pub derived_from: Vec<Expression>,
pub holds_when: Vec<Expression>,
pub conditioned_by: Vec<Expression>,
}
Expand description
Represents common fields for all type definition phrases.
Fields§
§derived_from: Vec<Expression>
A set of instance expressions that generate automatic instances for some type.
holds_when: Vec<Expression>
A set of boolean expressions that filter all possible types in the positive (syntax sugar for Derived from over a type’s fields with When <expr>
).
conditioned_by: Vec<Expression>
A set of boolean expressions that limits what instances may be derived by Derived from
-rules and Holds when
-rules, i.e., something is only derived if all Conditioned by
-rules are true.
Trait Implementations§
Source§impl Clone for TypeDefinitionCommon
impl Clone for TypeDefinitionCommon
Source§fn clone(&self) -> TypeDefinitionCommon
fn clone(&self) -> TypeDefinitionCommon
Returns a copy of the value. Read more
1.0.0 · 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 TypeDefinitionCommon
impl Debug for TypeDefinitionCommon
Source§impl<'de> Deserialize<'de> for TypeDefinitionCommon
impl<'de> Deserialize<'de> for TypeDefinitionCommon
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 Freeze for TypeDefinitionCommon
impl RefUnwindSafe for TypeDefinitionCommon
impl Send for TypeDefinitionCommon
impl Sync for TypeDefinitionCommon
impl Unpin for TypeDefinitionCommon
impl UnwindSafe for TypeDefinitionCommon
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