pub struct RdfFusionEncodings { /* private fields */ }
Expand description
Holds a configuration instance for each RDF Fusion encoding.
This is an instance (as opposed to a type) as some encodings can be configured. At least this is planned for the future. For each RDF Fusion instance, the encodings are fixed once it is created.
§Equality
The equality and hashing functions check for pointer equality of the underlying encodings.
Implementations§
Source§impl RdfFusionEncodings
impl RdfFusionEncodings
Sourcepub fn new(
plain_term: PlainTermEncoding,
typed_value: TypedValueEncoding,
object_id_mapping: Option<Arc<dyn ObjectIdMapping>>,
sortable_term: SortableTermEncoding,
) -> Self
pub fn new( plain_term: PlainTermEncoding, typed_value: TypedValueEncoding, object_id_mapping: Option<Arc<dyn ObjectIdMapping>>, sortable_term: SortableTermEncoding, ) -> Self
Creates a new RdfFusionEncodings.
Sourcepub fn plain_term(&self) -> &PlainTermEncoding
pub fn plain_term(&self) -> &PlainTermEncoding
Provides a reference to the used PlainTermEncoding.
Sourcepub fn typed_value(&self) -> &TypedValueEncoding
pub fn typed_value(&self) -> &TypedValueEncoding
Provides a reference to the used TypedValueEncoding.
Sourcepub fn object_id(&self) -> Option<&ObjectIdEncoding>
pub fn object_id(&self) -> Option<&ObjectIdEncoding>
Provides a reference to the used ObjectIdEncoding.
Sourcepub fn object_id_mapping(&self) -> Option<&dyn ObjectIdMapping>
pub fn object_id_mapping(&self) -> Option<&dyn ObjectIdMapping>
Provides a reference to the used ObjectIdEncoding.
Sourcepub fn sortable_term(&self) -> &SortableTermEncoding
pub fn sortable_term(&self) -> &SortableTermEncoding
Provides a reference to the used SortableTermEncoding.
Sourcepub fn get_data_types(&self, names: &[EncodingName]) -> Vec<DataType>
pub fn get_data_types(&self, names: &[EncodingName]) -> Vec<DataType>
Returns a vector of EncodingName for the given names
.
If some encodings are not defined in this RDF Fusion instance (e.g., no object ID encoding), the corresponding EncodingName is ignored.
Sourcepub fn try_get_encoding_name(
&self,
data_type: &DataType,
) -> Option<EncodingName>
pub fn try_get_encoding_name( &self, data_type: &DataType, ) -> Option<EncodingName>
Tries to obtain an EncodingName from a DataType. As we currently only support built-in encodings this mapping is unique.
In the future we might use a field here such that we can access metadata information.
Trait Implementations§
Source§impl Clone for RdfFusionEncodings
impl Clone for RdfFusionEncodings
Source§fn clone(&self) -> RdfFusionEncodings
fn clone(&self) -> RdfFusionEncodings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for RdfFusionEncodings
impl Debug for RdfFusionEncodings
Source§impl Hash for RdfFusionEncodings
impl Hash for RdfFusionEncodings
Source§impl PartialEq for RdfFusionEncodings
impl PartialEq for RdfFusionEncodings
impl Eq for RdfFusionEncodings
Auto Trait Implementations§
impl Freeze for RdfFusionEncodings
impl !RefUnwindSafe for RdfFusionEncodings
impl Send for RdfFusionEncodings
impl Sync for RdfFusionEncodings
impl Unpin for RdfFusionEncodings
impl !UnwindSafe for RdfFusionEncodings
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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