pub struct EndpointDescription { /* private fields */ }Expand description
Description of a SPARQL endpoint for querying RDF data.
This struct contains the necessary information to connect to and query a SPARQL endpoint, including URLs for queries and updates, and optional prefix mappings.
Implementations§
Source§impl EndpointDescription
impl EndpointDescription
Sourcepub fn new_unchecked(str: &str) -> Self
pub fn new_unchecked(str: &str) -> Self
Creates a new EndpointDescription from a URL string without validation.
§Arguments
str- The URL string for the SPARQL query endpoint.
Sourcepub fn query_url(&self) -> &IriS
pub fn query_url(&self) -> &IriS
Returns the query URL for this endpoint.
§Returns
A reference to the IriS representing the SPARQL query endpoint URL.
Sourcepub fn prefixmap(&self) -> PrefixMap
pub fn prefixmap(&self) -> PrefixMap
Returns the prefix map for this endpoint, or a default empty map if none is set.
§Returns
The PrefixMap containing IRI prefixes for query abbreviation.
Sourcepub fn with_prefixmap(self, prefixmap: PrefixMap) -> Self
pub fn with_prefixmap(self, prefixmap: PrefixMap) -> Self
Sourcepub fn add_prefixmap(&mut self, prefixmap: PrefixMap)
pub fn add_prefixmap(&mut self, prefixmap: PrefixMap)
Adds or replaces the prefix map for this endpoint.
§Arguments
prefixmap- ThePrefixMapto set for this endpoint.
Trait Implementations§
Source§impl Clone for EndpointDescription
impl Clone for EndpointDescription
Source§fn clone(&self) -> EndpointDescription
fn clone(&self) -> EndpointDescription
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EndpointDescription
impl Debug for EndpointDescription
Source§impl<'de> Deserialize<'de> for EndpointDescription
impl<'de> Deserialize<'de> for EndpointDescription
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FromStr for EndpointDescription
impl FromStr for EndpointDescription
Source§fn from_str(query_url: &str) -> Result<Self, Self::Err>
fn from_str(query_url: &str) -> Result<Self, Self::Err>
Parses an EndpointDescription from a URL string.
This validates that the provided string is a valid IRI before creating the endpoint description.
§Arguments
query_url- The URL string to parse as the SPARQL query endpoint.
§Returns
A Result containing the parsed EndpointDescription or an IriSError if parsing fails.