Struct DContext

Source
pub struct DContext<G, WG>
where G: InfallibleGraph, WG: Borrow<G>,
{ /* private fields */ }
Expand description

A type alias for acp access context description.

Implementations§

Source§

impl<G, WG> DContext<G, WG>
where G: InfallibleGraph, WG: Borrow<G>,

Source

pub fn into_parts(self) -> (HContext<ArcTerm>, WG)

Convert into parts.

Source

pub fn h_target<T2: Term + FromTerm>( &self, ) -> OwnedObjectHandleIterator<'_, G, HResource<T2>>

The target attribute describes requested resources.

Source§

impl<G: InfallibleGraph> DContext<G, G>

Source

pub fn into_with_arced_graph(self) -> DContext<G, Arc<G>>

Convert into nre context with inner graph wrapped in an arc.

Trait Implementations§

Source§

impl<G, WG> Clone for DContext<G, WG>
where G: InfallibleGraph, WG: Borrow<G> + Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<G, WG> Debug for DContext<G, WG>
where G: InfallibleGraph + Debug, WG: Borrow<G> + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<G, WG> Description for DContext<G, WG>
where G: InfallibleGraph, WG: Borrow<G> + Debug,

Source§

type Handle = HContext<BasicTerm<Arc<str>>>

Type of description’s subject handle.
Source§

type Graph = G

Type of description graph.
Source§

fn handle(&self) -> &Self::Handle

Get the handle to subject of the description.
Source§

fn graph(&self) -> &Self::Graph

Get a reference to graph of the description.
Source§

fn as_parts(&self) -> (&Self::Handle, &Self::Graph)

Get references to subject and graph parts of the description.
Source§

impl<G, WG> MutableDescription for DContext<G, WG>

Source§

type MutGraph = G

Type of mutable graph.
Source§

fn graph_mut(&mut self) -> &mut Self::Graph

Get a mutable reference to graph of the description.
Source§

fn as_parts_mut(&mut self) -> (&Self::Handle, &mut Self::Graph)

Get references to handle and mut-graph parts of the description.
Source§

impl<G, WG> SimpleDescription for DContext<G, WG>
where G: InfallibleGraph, WG: Borrow<G> + Debug,

Source§

type WGraph = WG

Type of wrapped graph.
Source§

fn new(handle: Self::Handle, wgraph: Self::WGraph) -> Self

Create a new instance with given params.
Source§

fn wgraph(&self) -> &Self::WGraph

Get the wrapped graph backing this description.

Auto Trait Implementations§

§

impl<G, WG> Freeze for DContext<G, WG>
where WG: Freeze,

§

impl<G, WG> RefUnwindSafe for DContext<G, WG>
where WG: RefUnwindSafe,

§

impl<G, WG> Send for DContext<G, WG>
where WG: Send,

§

impl<G, WG> Sync for DContext<G, WG>
where WG: Sync,

§

impl<G, WG> Unpin for DContext<G, WG>
where WG: Unpin,

§

impl<G, WG> UnwindSafe for DContext<G, WG>
where WG: 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<D> DescriptionExt for D
where D: Description,

Source§

fn get_all_triples<'g, TP>( &'g self, p: &'g TP, ) -> UnwrappingIterator<'g, Self::Graph>
where TP: Term,

Get all triples about the subject with given predicate.
Source§

fn get_all<'g, TP>(&'g self, p: &'g TP) -> ObjectIterator<'g, Self::Graph>
where TP: Term,

Get all objects of triples about the subject with given predicate.
Source§

fn get_all_handles<'g, H, TP>( &'g self, p: &'g TP, ) -> OwnedObjectHandleIterator<'g, Self::Graph, H>
where H: Handle, <H as Handle>::Term: FromTerm, TP: Term,

Get handles to all objects of triples about the subject with given predicate.
Source§

fn get_first<'g, TP>( &'g self, p: &'g TP, ) -> Option<<<Self::Graph as Graph>::Triple<'g> as Triple>::Term>
where TP: Term,

Get object of first triple about the subject with given predicate.
Source§

fn get_first_handle<'g, H, TP>(&'g self, p: &'g TP) -> Option<H>
where H: Handle, <H as Handle>::Term: FromTerm, TP: Term,

Get handle to object of first triple about the subject with given predicate.
Source§

fn has_any<'g, TP>(&'g self, p: &'g TP) -> bool
where TP: Term,

Check if there exist a triple about the subject with given predicate.
Source§

fn has_any_with<'g, TP, TO>(&'g self, p: &'g TP, o: &'g TO) -> bool
where TP: Term, TO: Term,

Check if there exist a triple about the subject with given predicate and given object.
Source§

fn has_common<'g, TP1, TP2>(&'g self, p1: &'g TP1, p2: &'g TP2) -> bool
where TP1: Term, TP2: Term,

Check if there are triples about the subject with given predicates with common object.
Source§

fn add<'s, TP, TO>(&'s mut self, p: &'s TP, o: &'s TO) -> bool
where Self: MutableDescription, TP: Term, TO: Term,

Add a statement about the subject with given predicate and object to the description. Returns if the addition actually changed the graph. Return value is significant only if backing graph is also a SetGraph.
Source§

fn add_all<'s, G, TP, TO>( &'s mut self, po_iter: impl Iterator<Item = (&'s TP, &'s TO)>, ) -> usize
where Self: MutableDescription, TP: Term + 's, TO: Term + 's,

Add statements about subject with given predicate, object pairs ro given graph. Read more
Source§

fn add_all_with<'s, TP, TO>( &'s mut self, p: &TP, o_iter: impl Iterator<Item = &'s TO>, ) -> usize
where Self: MutableDescription, TP: Term + 's, TO: Term + 's,

Add statements about resource with given predicate, and each of object.
Source§

fn remove<'s, TP, TO>(&'s mut self, p: &'s TP, o: &'s TO) -> bool
where Self: MutableDescription, TP: Term, TO: Term,

Remove any statement about the subject with given predicate and object from given graph. Returns if the removal actually changed the graph. Return value is significant only if G is also a SetGraph.
Source§

fn remove_all<'s, TP, TO>( &'s mut self, po_iter: impl Iterator<Item = (&'s TP, &'s TO)>, ) -> usize
where Self: MutableDescription, TP: Term + 's, TO: Term + 's,

Remove statements about the subject with given predicate, object pairs from given graph. Read more
Source§

fn remove_all_with<'s, TP>(&'s mut self, p: &'s TP) -> usize
where Self: MutableDescription, TP: Term,

Remove any statements about the resource with given predicate from given graph. Read more
Source§

fn set<'s, TP, TO>(&'s mut self, p: &'s TP, o: &'s TO)
where Self: MutableDescription, TP: Term, TO: Term,

Add statement about the subject with given predicate and object,and remove any other statements about the subject with given predicate.
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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<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