pub struct AstSubject {
pub identity: String,
pub labels: Vec<String>,
pub properties: HashMap<String, Value>,
}Expand description
Subject data - identity, labels, and properties
The subject provides “information about the elements” in a pattern.
§Examples
Node with identity and label:
{
"identity": "alice",
"labels": ["Person"],
"properties": {}
}Anonymous node with properties:
{
"identity": "",
"labels": [],
"properties": {"name": "Alice", "age": 30}
}Fields§
§identity: StringIdentity (empty string if not specified)
labels: Vec<String>Labels (type tags)
properties: HashMap<String, Value>Properties (arbitrary JSON values)
Values use mixed serialization:
- Simple types: native JSON (string, number, boolean, array, object)
- Complex types: tagged objects (Symbol, Integer, Decimal, Range, etc.)
Trait Implementations§
Source§impl Clone for AstSubject
impl Clone for AstSubject
Source§fn clone(&self) -> AstSubject
fn clone(&self) -> AstSubject
Returns a duplicate 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 AstSubject
impl Debug for AstSubject
Source§impl<'de> Deserialize<'de> for AstSubject
impl<'de> Deserialize<'de> for AstSubject
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 AstSubject
impl PartialEq for AstSubject
Source§impl Serialize for AstSubject
impl Serialize for AstSubject
impl StructuralPartialEq for AstSubject
Auto Trait Implementations§
impl Freeze for AstSubject
impl RefUnwindSafe for AstSubject
impl Send for AstSubject
impl Sync for AstSubject
impl Unpin for AstSubject
impl UnsafeUnpin for AstSubject
impl UnwindSafe for AstSubject
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