pub enum CommentDirective {
Group(String),
Related(Vec<String>),
DependsOn(Vec<String>),
PartOf(String),
Invariant(String),
Intent(String),
Custom {
key: String,
value: String,
},
}Expand description
Comment-based spec directive.
Represents @spec:* directives parsed from comments.
Users can convert from ryo-spec types to this enum.
Variants§
Group(String)
@spec:group(name) - Assign to a semantic group
Related(Vec<String>)
@spec:related(A, B, ...) - Related types (bidirectional)
DependsOn(Vec<String>)
@spec:depends-on(A, B, ...) - Depends on other specs
PartOf(String)
@spec:part-of(Parent) - Part of a larger spec
Invariant(String)
@spec:invariant(description) - Domain invariant
Intent(String)
@spec:intent(description) - Design intent
Custom
@spec:custom-key(value) - Custom directive
Trait Implementations§
Source§impl Clone for CommentDirective
impl Clone for CommentDirective
Source§fn clone(&self) -> CommentDirective
fn clone(&self) -> CommentDirective
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CommentDirective
impl Debug for CommentDirective
Source§impl PartialEq for CommentDirective
impl PartialEq for CommentDirective
Source§fn eq(&self, other: &CommentDirective) -> bool
fn eq(&self, other: &CommentDirective) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CommentDirective
impl StructuralPartialEq for CommentDirective
Auto Trait Implementations§
impl Freeze for CommentDirective
impl RefUnwindSafe for CommentDirective
impl Send for CommentDirective
impl Sync for CommentDirective
impl Unpin for CommentDirective
impl UnsafeUnpin for CommentDirective
impl UnwindSafe for CommentDirective
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> 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