Skip to main content

DataRange

Enum DataRange 

Source
pub enum DataRange<L = OwlLiteral> {
    Datatype(Iri<String>),
    DataIntersectionOf(OperandSet<Self, 2>),
    DataUnionOf(OperandSet<Self, 2>),
    DataComplementOf(Box<Self>),
    DataOneOf(OperandSet<L, 1>),
    DatatypeRestriction {
        datatype: Iri<String>,
        restrictions: OperandSet<FacetRestriction<L>, 1>,
    },
}
Expand description

A unary OWL 2 data range, independent of any datatype evaluator or RDF store.

Variants§

§

Datatype(Iri<String>)

A named datatype.

§

DataIntersectionOf(OperandSet<Self, 2>)

Intersection of at least two data ranges.

§

DataUnionOf(OperandSet<Self, 2>)

Union of at least two data ranges.

§

DataComplementOf(Box<Self>)

Complement of one data range.

§

DataOneOf(OperandSet<L, 1>)

Enumeration of at least one literal, preserving exact lexical forms.

§

DatatypeRestriction

A named datatype restricted by at least one facet/value pair.

Fields

§datatype: Iri<String>

The restricted datatype.

§restrictions: OperandSet<FacetRestriction<L>, 1>

Structural restrictions, interpreted conjunctively.

Implementations§

Source§

impl<L> DataRange<L>

Source

pub fn datatype(datatype: Iri<String>) -> Self

Create a named datatype range.

Source

pub fn data_intersection_of( operands: Vec<Self>, ) -> Result<Self, StructuralModelError>

Create an intersection of data ranges.

§Errors

Returns StructuralModelError::InvalidFormat for fewer than two operands.

Source

pub fn data_union_of(operands: Vec<Self>) -> Result<Self, StructuralModelError>

Create a union of data ranges.

§Errors

Returns StructuralModelError::InvalidFormat for fewer than two operands.

Source

pub fn data_complement_of(operand: Self) -> Self

Create the complement of a data range.

Source

pub fn data_one_of(literals: Vec<L>) -> Result<Self, StructuralModelError>

Create a literal enumeration without normalizing datatype values.

§Errors

Returns StructuralModelError::InvalidFormat for zero literals.

Source

pub fn datatype_restriction( datatype: Iri<String>, restrictions: Vec<FacetRestriction<L>>, ) -> Result<Self, StructuralModelError>

Create a restricted datatype without evaluating its facets or values.

§Errors

Returns StructuralModelError::InvalidFormat for zero facet restrictions.

Source§

impl<L> DataRange<L>

Source

pub fn kind(&self) -> DataRangeKind

Return the standard data-range family without evaluating datatype values.

Trait Implementations§

Source§

impl<L: Clone> Clone for DataRange<L>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<L: Debug> Debug for DataRange<L>

Source§

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

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

impl<'de, L> Deserialize<'de> for DataRange<L>
where L: Deserialize<'de>,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<L: Eq> Eq for DataRange<L>

Source§

impl<L: Hash> Hash for DataRange<L>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<L: PartialEq> PartialEq for DataRange<L>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<L> Serialize for DataRange<L>
where L: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<L: PartialEq> StructuralPartialEq for DataRange<L>

Auto Trait Implementations§

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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.