Skip to main content

Neigh

Enum Neigh 

Source
pub enum Neigh<S>
where S: NeighsRDF,
{ Direct { p: S::IRI, o: S::Term, }, Inverse { s: S::Subject, p: S::IRI, }, }
Expand description

Represents a single neighborhood relationship in an RDF graph.

A neighborhood relationship can be either a direct connection (outgoing arc) or an inverse connection (incoming arc) relative to a focus node.

§Type Parameters

  • S - The RDF graph type implementing NeighsRDF

§Variants

  • Direct: An outgoing relationship where the focus node is the subject
  • Inverse: An incoming relationship where the focus node is the object

Variants§

§

Direct

A direct (outgoing) relationship from the focus node.

Represents a triple pattern: (focusNode, p, o) where the focus node is the subject, p is the predicate, and o is the object.

§Fields

  • p - The predicate IRI of the relationship
  • o - The object term that the predicate points to

Fields

§p: S::IRI
§o: S::Term
§

Inverse

An inverse (incoming) relationship to the focus node.

Represents a triple pattern: (s, p, focusNode) where s is the subject, p is the predicate, and the focus node is the object.

§Fields

  • s - The subject that has this relationship to the focus node
  • p - The predicate IRI of the relationship

Fields

§s: S::Subject
§p: S::IRI

Implementations§

Source§

impl<S> Neigh<S>
where S: NeighsRDF,

Source

pub fn direct(pred: S::IRI, object: S::Term) -> Neigh<S>

Creates a direct (outgoing) neighborhood relationship.

Constructs a neighborhood representing an outgoing arc from a focus node via the specified predicate to the given object.

§Arguments
  • pred - The predicate IRI of the relationship
  • object - The object term that the predicate points to
Source

pub fn inverse(pred: S::IRI, subject: S::Subject) -> Neigh<S>

Creates an inverse (incoming) neighborhood relationship.

Constructs a neighborhood representing an incoming arc to a focus node via the specified predicate from the given subject.

§Arguments
  • pred - The predicate IRI of the relationship
  • subject - The subject that has this relationship to the focus node

Trait Implementations§

Source§

impl<S> FromIterator<Neigh<S>> for NeighsIterator<S>
where S: NeighsRDF,

Source§

fn from_iter<T>(_t: T) -> Self
where T: IntoIterator,

Constructs a NeighsIterator from an iterator of neighborhoods.

Auto Trait Implementations§

§

impl<S> Freeze for Neigh<S>
where <S as Rdf>::IRI: Freeze, <S as Rdf>::Term: Freeze, <S as Rdf>::Subject: Freeze,

§

impl<S> RefUnwindSafe for Neigh<S>
where <S as Rdf>::IRI: RefUnwindSafe, <S as Rdf>::Term: RefUnwindSafe, <S as Rdf>::Subject: RefUnwindSafe,

§

impl<S> Send for Neigh<S>
where <S as Rdf>::IRI: Send, <S as Rdf>::Term: Send, <S as Rdf>::Subject: Send,

§

impl<S> Sync for Neigh<S>
where <S as Rdf>::IRI: Sync, <S as Rdf>::Term: Sync, <S as Rdf>::Subject: Sync,

§

impl<S> Unpin for Neigh<S>
where <S as Rdf>::IRI: Unpin, <S as Rdf>::Term: Unpin, <S as Rdf>::Subject: Unpin,

§

impl<S> UnsafeUnpin for Neigh<S>
where <S as Rdf>::IRI: UnsafeUnpin, <S as Rdf>::Term: UnsafeUnpin, <S as Rdf>::Subject: UnsafeUnpin,

§

impl<S> UnwindSafe for Neigh<S>
where <S as Rdf>::IRI: UnwindSafe, <S as Rdf>::Term: UnwindSafe, <S as Rdf>::Subject: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more