pub struct Relation {
pub kind: RelationKind,
pub target: RelationTarget,
pub transitive: bool,
pub max_depth: Option<u32>,
pub scope: TraversalScope,
pub as: Option<String>,
}Expand description
Single relation condition
Fields§
§kind: RelationKindRelation type
target: RelationTargetTarget query (simplified for now - will be expanded)
transitive: boolInclude transitive relations
max_depth: Option<u32>Maximum traversal depth for transitive queries (None = unlimited)
scope: TraversalScopeTraversal scope for transitive queries
as: Option<String>Bind result to variable
Implementations§
Source§impl Relation
impl Relation
Sourcepub fn new(kind: RelationKind, target: RelationTarget) -> Self
pub fn new(kind: RelationKind, target: RelationTarget) -> Self
Create a new relation
Sourcepub fn transitive(self) -> Self
pub fn transitive(self) -> Self
Set transitive mode
Sourcepub fn with_max_depth(self, depth: u32) -> Self
pub fn with_max_depth(self, depth: u32) -> Self
Set max depth
Sourcepub fn with_scope(self, scope: TraversalScope) -> Self
pub fn with_scope(self, scope: TraversalScope) -> Self
Set scope
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Relation
impl<'de> Deserialize<'de> for Relation
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 JsonSchema for Relation
impl JsonSchema for Relation
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Relation
Auto Trait Implementations§
impl Freeze for Relation
impl RefUnwindSafe for Relation
impl Send for Relation
impl Sync for Relation
impl Unpin for Relation
impl UnsafeUnpin for Relation
impl UnwindSafe for Relation
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