pub struct Binding<S: Schema, M: ThingModel<Schema = S>, Mode: SelectionMode = Exact> { /* private fields */ }Expand description
One schema/model-branded Copy binding token allocated by a
QuerySession. Copying preserves the binding identity; only a fresh
session binding call creates a new occurrence.
Implementations§
Source§impl<S: Schema, M: ThingModel<Schema = S>, Mode: SelectionMode> Binding<S, M, Mode>
impl<S: Schema, M: ThingModel<Schema = S>, Mode: SelectionMode> Binding<S, M, Mode>
Sourcepub fn iid(self, iid: impl Into<String>) -> Predicate<S>
pub fn iid(self, iid: impl Into<String>) -> Predicate<S>
Match this generated binding by one canonical TypeDB thing IID.
Sourcepub fn iid_in(
self,
iids: impl IntoIterator<Item = impl Into<String>>,
) -> Predicate<S>
pub fn iid_in( self, iids: impl IntoIterator<Item = impl Into<String>>, ) -> Predicate<S>
Match this generated binding by one of a non-empty bounded IID set.
Sourcepub fn collect(self) -> Collected<S, Self>where
Self: Selectable<S>,
pub fn collect(self) -> Collected<S, Self>where
Self: Selectable<S>,
Select this binding as an owned collection per distinct page root, preserving match multiplicity by default.
Source§impl<S: Schema, M: ThingModel<Schema = S>, Mode: SelectionMode> Binding<S, M, Mode>
impl<S: Schema, M: ThingModel<Schema = S>, Mode: SelectionMode> Binding<S, M, Mode>
Sourcepub fn field<Owner, V>(
self,
token: FieldToken<Owner, V>,
) -> BoundField<S, Owner, V>where
Owner: Model<Schema = S>,
M: NominalUpcast<Owner>,
pub fn field<Owner, V>(
self,
token: FieldToken<Owner, V>,
) -> BoundField<S, Owner, V>where
Owner: Model<Schema = S>,
M: NominalUpcast<Owner>,
Resolve one generated owned field against this binding occurrence.
The declaring owner must be this binding’s model or a generated nominal ancestor; unrelated same-spelled owners fail to type-check, and the installed registry re-validates the admission at lowering.
Source§impl<S: Schema, M: RelationModel<Schema = S> + ThingModel<Schema = S>, Mode: SelectionMode> Binding<S, M, Mode>
impl<S: Schema, M: RelationModel<Schema = S> + ThingModel<Schema = S>, Mode: SelectionMode> Binding<S, M, Mode>
Sourcepub fn role<Owner, Players>(
self,
token: RoleToken<Owner, Players>,
) -> BoundRole<S, Owner, Players>where
Owner: RelationModel<Schema = S>,
M: RoleTokenCompatible<Owner, Players>,
pub fn role<Owner, Players>(
self,
token: RoleToken<Owner, Players>,
) -> BoundRole<S, Owner, Players>where
Owner: RelationModel<Schema = S>,
M: RoleTokenCompatible<Owner, Players>,
Resolve one active generated relation role against this relation binding occurrence. Only relation bindings expose roles; specialized-away ancestor tokens have no generated compatibility evidence.
Trait Implementations§
Source§impl<S: Schema, M: ThingModel<Schema = S>, Mode: SelectionMode> Clone for Binding<S, M, Mode>
impl<S: Schema, M: ThingModel<Schema = S>, Mode: SelectionMode> Clone for Binding<S, M, Mode>
impl<S: Schema, M: ThingModel<Schema = S>, Mode: SelectionMode> Copy for Binding<S, M, Mode>
Source§impl<S: Schema, M: ThingModel<Schema = S>, Mode: SelectionMode> Debug for Binding<S, M, Mode>
impl<S: Schema, M: ThingModel<Schema = S>, Mode: SelectionMode> Debug for Binding<S, M, Mode>
impl<S: Schema, M: ThingModel<Schema = S>, Mode: SelectionMode> Eq for Binding<S, M, Mode>
Source§impl<S: Schema, M: ThingModel<Schema = S>, Mode: SelectionMode> PartialEq for Binding<S, M, Mode>
impl<S: Schema, M: ThingModel<Schema = S>, Mode: SelectionMode> PartialEq for Binding<S, M, Mode>
Source§impl<S: Schema, M: ThingModel<Schema = S> + CompleteModel> Selectable<S> for Binding<S, M, Exact>
impl<S: Schema, M: ThingModel<Schema = S> + CompleteModel> Selectable<S> for Binding<S, M, Exact>
Source§impl<S: Schema, M: ThingModel<Schema = S> + SubtypeRootModel> Selectable<S> for Binding<S, M, Subtypes>
impl<S: Schema, M: ThingModel<Schema = S> + SubtypeRootModel> Selectable<S> for Binding<S, M, Subtypes>
Auto Trait Implementations§
impl<S, M, Mode> Freeze for Binding<S, M, Mode>
impl<S, M, Mode> RefUnwindSafe for Binding<S, M, Mode>
impl<S, M, Mode> Send for Binding<S, M, Mode>
impl<S, M, Mode> Sync for Binding<S, M, Mode>
impl<S, M, Mode> Unpin for Binding<S, M, Mode>
impl<S, M, Mode> UnsafeUnpin for Binding<S, M, Mode>
impl<S, M, Mode> UnwindSafe for Binding<S, M, Mode>
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
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
key and return true if they are equal.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
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request