pub enum TripleExpr {
EachOf {
id: Option<TripleExprLabel>,
expressions: Vec<TripleExprWrapper>,
min: Option<i32>,
max: Option<i32>,
sem_acts: Option<Vec<SemAct>>,
annotations: Option<Vec<Annotation>>,
},
OneOf {
id: Option<TripleExprLabel>,
expressions: Vec<TripleExprWrapper>,
min: Option<i32>,
max: Option<i32>,
sem_acts: Option<Vec<SemAct>>,
annotations: Option<Vec<Annotation>>,
},
TripleConstraint {
id: Option<TripleExprLabel>,
negated: Option<bool>,
inverse: Option<bool>,
predicate: IriRef,
value_expr: Option<Box<ShapeExpr>>,
min: Option<i32>,
max: Option<i32>,
sem_acts: Option<Vec<SemAct>>,
annotations: Option<Vec<Annotation>>,
},
TripleExprRef(TripleExprLabel),
}
Variants§
EachOf
Fields
§
id: Option<TripleExprLabel>
§
expressions: Vec<TripleExprWrapper>
§
annotations: Option<Vec<Annotation>>
OneOf
Fields
§
id: Option<TripleExprLabel>
§
expressions: Vec<TripleExprWrapper>
§
annotations: Option<Vec<Annotation>>
TripleConstraint
TripleExprRef(TripleExprLabel)
Implementations§
Source§impl TripleExpr
impl TripleExpr
pub fn triple_constraint( negated: Option<bool>, inverse: Option<bool>, predicate: IriRef, se: Option<ShapeExpr>, min: Option<i32>, max: Option<i32>, ) -> TripleExpr
pub fn each_of(tes: Vec<TripleExpr>) -> TripleExpr
pub fn one_of(tes: Vec<TripleExpr>) -> TripleExpr
pub fn with_id(self, id: Option<TripleExprLabel>) -> Self
pub fn with_min(self, new_min: Option<i32>) -> Self
pub fn with_max(self, new_max: Option<i32>) -> Self
pub fn with_sem_acts(self, new_sem_acts: Option<Vec<SemAct>>) -> Self
pub fn with_annotations(self, new_annotations: Option<Vec<Annotation>>) -> Self
pub fn add_annotation(&mut self, annotation: Annotation)
Trait Implementations§
Source§impl Clone for TripleExpr
impl Clone for TripleExpr
Source§fn clone(&self) -> TripleExpr
fn clone(&self) -> TripleExpr
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TripleExpr
impl Debug for TripleExpr
Source§impl Deref for TripleExpr
impl Deref for TripleExpr
fn deref( &self, base: &Option<IriS>, prefixmap: &Option<PrefixMap>, ) -> Result<Self, DerefError>
fn deref_opt<T>(
maybe: &Option<T>,
base: &Option<IriS>,
prefixmap: &Option<PrefixMap>,
) -> Result<Option<T>, DerefError>where
T: Deref,
fn deref_opt_box<T>(
maybe: &Option<Box<T>>,
base: &Option<IriS>,
prefixmap: &Option<PrefixMap>,
) -> Result<Option<Box<T>>, DerefError>where
T: Deref,
fn deref_vec<T>(
ts: &[T],
base: &Option<IriS>,
prefixmap: &Option<PrefixMap>,
) -> Result<Vec<T>, DerefError>where
T: Deref,
fn deref_vec_box<T>(
ts: &[Box<T>],
base: &Option<IriS>,
prefixmap: &Option<PrefixMap>,
) -> Result<Vec<T>, DerefError>where
T: Deref,
fn deref_opt_vec<T>(
maybe_ts: &Option<Vec<T>>,
base: &Option<IriS>,
prefixmap: &Option<PrefixMap>,
) -> Result<Option<Vec<T>>, DerefError>where
T: Deref,
Source§impl<'de> Deserialize<'de> for TripleExpr
impl<'de> Deserialize<'de> for TripleExpr
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<TripleExpr> for TripleExprWrapper
impl From<TripleExpr> for TripleExprWrapper
Source§fn from(value: TripleExpr) -> Self
fn from(value: TripleExpr) -> Self
Converts to this type from the input type.
Source§impl FromStr for TripleExpr
impl FromStr for TripleExpr
Source§impl PartialEq for TripleExpr
impl PartialEq for TripleExpr
Source§impl Serialize for TripleExpr
impl Serialize for TripleExpr
Source§impl SerializeStringOrStruct for TripleExpr
impl SerializeStringOrStruct for TripleExpr
Source§fn serialize_string_or_struct<S>(
&self,
serializer: S,
) -> Result<S::Ok, S::Error>where
S: Serializer,
fn serialize_string_or_struct<S>(
&self,
serializer: S,
) -> Result<S::Ok, S::Error>where
S: Serializer,
Serialize either a string representation of this struct, or a full
struct if the object cannot be represented as a string.
impl StructuralPartialEq for TripleExpr
Auto Trait Implementations§
impl Freeze for TripleExpr
impl RefUnwindSafe for TripleExpr
impl Send for TripleExpr
impl Sync for TripleExpr
impl Unpin for TripleExpr
impl UnwindSafe for TripleExpr
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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