pub struct Shape {
pub closed: Option<bool>,
pub extra: Option<Vec<IriRef>>,
pub expression: Option<TripleExprWrapper>,
pub sem_acts: Option<Vec<SemAct>>,
pub annotations: Option<Vec<Annotation>>,
pub extends: Option<Vec<ShapeExprLabel>>,
}
Fields§
§closed: Option<bool>
§extra: Option<Vec<IriRef>>
§expression: Option<TripleExprWrapper>
§sem_acts: Option<Vec<SemAct>>
§annotations: Option<Vec<Annotation>>
§extends: Option<Vec<ShapeExprLabel>>
Implementations§
Source§impl Shape
impl Shape
pub fn new( closed: Option<bool>, extra: Option<Vec<IriRef>>, expression: Option<TripleExpr>, ) -> Self
pub fn with_expression(self, expression: TripleExpr) -> Self
pub fn with_sem_acts(self, sem_acts: Option<Vec<SemAct>>) -> Self
pub fn annotations(&self) -> Option<impl Iterator<Item = &Annotation>>
pub fn has_annotations(&self) -> bool
pub fn with_annotations(self, annotations: Option<Vec<Annotation>>) -> Self
pub fn add_annotation(&mut self, annotation: Annotation)
pub fn with_extends(self, extends: Option<Vec<ShapeExprLabel>>) -> Self
pub fn add_extend(&mut self, extend: ShapeExprLabel)
pub fn is_closed(&self) -> bool
pub fn triple_expr(&self) -> Option<TripleExpr>
Trait Implementations§
Source§impl Deref for Shape
impl Deref for Shape
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 Shape
impl<'de> Deserialize<'de> for Shape
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
impl StructuralPartialEq for Shape
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnwindSafe for Shape
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