pub enum ItemAttributes {
Solution,
UseCase,
Scenario,
SystemRequirement {
specification: String,
depends_on: Vec<ItemId>,
},
SystemArchitecture {
platform: Option<String>,
},
SoftwareRequirement {
specification: String,
depends_on: Vec<ItemId>,
},
HardwareRequirement {
specification: String,
depends_on: Vec<ItemId>,
},
SoftwareDetailedDesign,
HardwareDetailedDesign,
Adr {
status: AdrStatus,
deciders: Vec<String>,
supersedes: Vec<ItemId>,
},
}Expand description
Type-specific attributes for items in the knowledge graph.
Variants§
Solution
Solution - no type-specific attributes.
UseCase
Use Case - no type-specific attributes beyond upstream refs.
Scenario
Scenario - no type-specific attributes beyond upstream refs.
SystemRequirement
System Requirement with specification and peer dependencies.
SystemArchitecture
System Architecture with platform.
SoftwareRequirement
Software Requirement with specification and peer dependencies.
HardwareRequirement
Hardware Requirement with specification and peer dependencies.
SoftwareDetailedDesign
Software Detailed Design.
HardwareDetailedDesign
Hardware Detailed Design.
Adr
Architecture Decision Record with ADR-specific fields.
Implementations§
Source§impl ItemAttributes
impl ItemAttributes
Sourcepub fn for_type(item_type: ItemType) -> Self
pub fn for_type(item_type: ItemType) -> Self
Creates default attributes for the given item type.
Sourcepub fn specification(&self) -> Option<&String>
pub fn specification(&self) -> Option<&String>
Returns the specification if this is a requirement type.
Sourcepub fn depends_on(&self) -> &[ItemId]
pub fn depends_on(&self) -> &[ItemId]
Returns the depends_on references if this is a requirement type.
Sourcepub fn platform(&self) -> Option<&String>
pub fn platform(&self) -> Option<&String>
Returns the platform if this is a SystemArchitecture.
Sourcepub fn supersedes(&self) -> &[ItemId]
pub fn supersedes(&self) -> &[ItemId]
Returns the supersedes references if this is an ADR.
Trait Implementations§
Source§impl Clone for ItemAttributes
impl Clone for ItemAttributes
Source§fn clone(&self) -> ItemAttributes
fn clone(&self) -> ItemAttributes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ItemAttributes
impl Debug for ItemAttributes
Source§impl Default for ItemAttributes
impl Default for ItemAttributes
Source§fn default() -> ItemAttributes
fn default() -> ItemAttributes
Source§impl<'de> Deserialize<'de> for ItemAttributes
impl<'de> Deserialize<'de> for ItemAttributes
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>,
Auto Trait Implementations§
impl Freeze for ItemAttributes
impl RefUnwindSafe for ItemAttributes
impl Send for ItemAttributes
impl Sync for ItemAttributes
impl Unpin for ItemAttributes
impl UnsafeUnpin for ItemAttributes
impl UnwindSafe for ItemAttributes
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
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>
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>
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