pub struct CanonType {
pub kind: CanonKind,
pub not_null: bool,
}Expand description
A fully CIP-100-normalized Cypher type.
Fields§
§kind: CanonKind§not_null: boolWhether this node is marked NOT NULL. Always false for Nothing
(normalized away, see CanonType::predefined) and for Union (the
CIP-86 grammar gives closed unions no NOT NULL production of
their own – nullability is carried per-member instead).
Implementations§
Source§impl CanonType
impl CanonType
Sourcepub fn predefined(kind: PredefinedKind, not_null: bool) -> Self
pub fn predefined(kind: PredefinedKind, not_null: bool) -> Self
Builds a predefined leaf, applying the “Simplify NULL NOT NULL” /
“Simplify NOTHING NOT NULL” rules (both normalize to plain
NOTHING) up front so every other rule can assume not_null is
always false on Nothing.
pub fn list(element: CanonType, not_null: bool) -> Self
Trait Implementations§
impl Eq for CanonType
impl StructuralPartialEq for CanonType
Auto Trait Implementations§
impl Forget for CanonType
impl Freeze for CanonType
impl Move for CanonType
impl RefUnwindSafe for CanonType
impl Send for CanonType
impl Sync for CanonType
impl Unpin for CanonType
impl UnsafeUnpin for CanonType
impl UnwindSafe for CanonType
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.