pub enum ShapeExpr {
ShapeOr {
shape_exprs: Vec<ShapeExprWrapper>,
},
ShapeAnd {
shape_exprs: Vec<ShapeExprWrapper>,
},
ShapeNot {
shape_expr: Box<ShapeExprWrapper>,
},
NodeConstraint(NodeConstraint),
Shape(Shape),
External,
Ref(ShapeExprLabel),
}
Variants§
ShapeOr
Fields
§
shape_exprs: Vec<ShapeExprWrapper>
ShapeAnd
Fields
§
shape_exprs: Vec<ShapeExprWrapper>
ShapeNot
Fields
§
shape_expr: Box<ShapeExprWrapper>
NodeConstraint(NodeConstraint)
Shape(Shape)
External
Ref(ShapeExprLabel)
Implementations§
Source§impl ShapeExpr
impl ShapeExpr
pub fn empty_shape() -> ShapeExpr
pub fn external() -> ShapeExpr
pub fn shape_not(se: ShapeExpr) -> ShapeExpr
pub fn or(ses: Vec<ShapeExpr>) -> ShapeExpr
pub fn and(ses: Vec<ShapeExpr>) -> ShapeExpr
pub fn node_constraint(nc: NodeConstraint) -> ShapeExpr
pub fn iri_ref(iri_ref: IriRef) -> ShapeExpr
pub fn shape_ref(label: ShapeExprLabel) -> ShapeExpr
pub fn any() -> ShapeExpr
pub fn shape(shape: Shape) -> ShapeExpr
pub fn add_annotation(&mut self, annotation: Annotation)
pub fn has_annotations(&self) -> bool
pub fn annotations(&self) -> Option<impl Iterator<Item = &Annotation>>
Trait Implementations§
Source§impl Deref for ShapeExpr
impl Deref for ShapeExpr
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 ShapeExpr
impl<'de> Deserialize<'de> for ShapeExpr
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<ShapeExpr> for ShapeExprWrapper
impl From<ShapeExpr> for ShapeExprWrapper
Source§impl SerializeStringOrStruct for ShapeExpr
impl SerializeStringOrStruct for ShapeExpr
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 ShapeExpr
Auto Trait Implementations§
impl Freeze for ShapeExpr
impl RefUnwindSafe for ShapeExpr
impl Send for ShapeExpr
impl Sync for ShapeExpr
impl Unpin for ShapeExpr
impl UnwindSafe for ShapeExpr
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