pub struct FederatedService {
pub endpoint: String,
pub auth_method: u8,
pub timeout_ms: u32,
}Expand description
A federated service endpoint identified by a readable URL string.
URL schemes:
local:<graph>/qualia:<graph>— execute against the local QualiaDB instancehttp:///https://— remote SPARQL endpoint (HTTP transport)
Fields§
§endpoint: StringEndpoint URL, e.g. local:default, qualia:graph1, https://db.example.org/sparql.
auth_method: u80 = none, 1 = DID-LD, 2 = JWT (forwarded to remote endpoints).
timeout_ms: u32Request timeout in milliseconds (remote endpoints only).
Implementations§
Source§impl FederatedService
impl FederatedService
Sourcepub fn new(endpoint: &str) -> Self
pub fn new(endpoint: &str) -> Self
Create a new service endpoint with no auth and a 30s default timeout.
Sourcepub fn is_local(&self) -> bool
pub fn is_local(&self) -> bool
Returns true when the endpoint targets the local QualiaDB instance and should be executed in-process rather than over HTTP.
Sourcepub fn local_graph(&self) -> Option<&str>
pub fn local_graph(&self) -> Option<&str>
Returns the local graph identifier portion of a local:/qualia: endpoint,
or None for remote endpoints.
Trait Implementations§
Source§impl Clone for FederatedService
impl Clone for FederatedService
Source§fn clone(&self) -> FederatedService
fn clone(&self) -> FederatedService
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FederatedService
impl RefUnwindSafe for FederatedService
impl Send for FederatedService
impl Sync for FederatedService
impl Unpin for FederatedService
impl UnsafeUnpin for FederatedService
impl UnwindSafe for FederatedService
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>,
Aggregate shares in an MPC protocol.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
Converts
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>
Converts
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