pub struct FederatedQueryHandler<'a> {
pub local_quins: &'a [NQuin],
pub endpoints: [Option<ServiceEndpoint>; 16],
pub endpoint_count: u8,
pub cache_enabled: bool,
/* private fields */
}Expand description
SPARQL Federated Query Handler — a DID-registry front over the URL-based
FederatedQueryEngine. It maps a DID to a concrete endpoint URL string and
dispatches remote SPARQL requests through the same real HTTP transport.
Fields§
§local_quins: &'a [NQuin]§endpoints: [Option<ServiceEndpoint>; 16]§endpoint_count: u8§cache_enabled: boolImplementations§
Source§impl<'a> FederatedQueryHandler<'a>
impl<'a> FederatedQueryHandler<'a>
pub fn new(quins: &'a [NQuin]) -> Self
Sourcepub fn set_endpoint_url(&mut self, did: u64, url: &str)
pub fn set_endpoint_url(&mut self, did: u64, url: &str)
Associate a DID with a concrete endpoint URL so remote queries can actually be
dispatched over HTTP (the ServiceEndpoint.endpoint_url hash is not reversible).
Sourcepub fn register_endpoint(
&mut self,
endpoint: ServiceEndpoint,
) -> Result<u8, String>
pub fn register_endpoint( &mut self, endpoint: ServiceEndpoint, ) -> Result<u8, String>
Register a federated endpoint
Sourcepub fn execute_service(
&self,
did: u64,
query: &str,
_format: &str,
) -> Result<FederatedResult, String>
pub fn execute_service( &self, did: u64, query: &str, _format: &str, ) -> Result<FederatedResult, String>
Execute a federated query against the endpoint registered for did, over the
real HTTP SPARQL 1.1 Protocol transport.
Requires a resolvable endpoint URL registered via
set_endpoint_url (the ServiceEndpoint.endpoint_url
hash is not reversible to a URL). Authenticated (DID-LD/JWT) endpoints must be
signed by the identity layer; only the no-auth path is dispatched here — no
fabricated auth header. Network egress: makes a real outbound request.
Sourcepub fn execute_federated(
&self,
_service_did: u64,
_service_query: &str,
_local_pattern: PatternId,
_ctx: &SparqlQueryContext,
) -> Result<Vec<BindingRow>, String>
pub fn execute_federated( &self, _service_did: u64, _service_query: &str, _local_pattern: PatternId, _ctx: &SparqlQueryContext, ) -> Result<Vec<BindingRow>, String>
Execute federated query with local data
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for FederatedQueryHandler<'a>
impl<'a> RefUnwindSafe for FederatedQueryHandler<'a>
impl<'a> Send for FederatedQueryHandler<'a>
impl<'a> Sync for FederatedQueryHandler<'a>
impl<'a> Unpin for FederatedQueryHandler<'a>
impl<'a> UnsafeUnpin for FederatedQueryHandler<'a>
impl<'a> UnwindSafe for FederatedQueryHandler<'a>
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more