pub struct RequirementsStore {Show 22 fields
pub name: String,
pub title: String,
pub description: String,
pub requirements: Vec<Requirement>,
pub users: Vec<User>,
pub teams: Vec<Team>,
pub id_config: IdConfiguration,
pub features: Vec<FeatureDefinition>,
pub next_feature_number: u32,
pub next_spec_number: u32,
pub prefix_counters: HashMap<String, u32>,
pub relationship_definitions: Vec<RelationshipDefinition>,
pub reaction_definitions: Vec<ReactionDefinition>,
pub meta_counters: HashMap<String, u32>,
pub type_definitions: Vec<CustomTypeDefinition>,
pub allowed_prefixes: Vec<String>,
pub restrict_prefixes: bool,
pub ai_prompts: AiPromptConfig,
pub baselines: Vec<Baseline>,
pub store_version: i64,
pub migrated_to: Option<String>,
pub dispenser: Option<DispenserHandle>,
}Expand description
Collection of all requirements
Fields§
§name: StringDatabase name (displayed in window title prefix)
title: StringDatabase title (one-liner, displayed in window title)
description: StringDatabase description (multi-line)
requirements: Vec<Requirement>§users: Vec<User>Users in the system
teams: Vec<Team>Teams in the system
id_config: IdConfigurationID system configuration
features: Vec<FeatureDefinition>Defined features with their prefixes
next_feature_number: u32Counter for feature numbers (used when creating new features)
next_spec_number: u32Global counter for requirement IDs (used with Global numbering strategy)
prefix_counters: HashMap<String, u32>Per-prefix counters for requirement IDs (used with PerPrefix numbering) Key is the prefix (e.g., “FR”, “AUTH”), value is the next number
relationship_definitions: Vec<RelationshipDefinition>Relationship type definitions with constraints
reaction_definitions: Vec<ReactionDefinition>Reaction definitions for comments
meta_counters: HashMap<String, u32>Counter for meta-type IDs (users, views, etc.) - maps prefix to next number e.g., “$USER” -> 1 means next user will be $USER-001
type_definitions: Vec<CustomTypeDefinition>Custom type definitions with their statuses and fields
allowed_prefixes: Vec<String>List of allowed/known ID prefixes for the project These are collected from usage and can be managed by admins
restrict_prefixes: boolWhether to restrict prefix selection to only allowed_prefixes When false, users can enter any valid prefix (which gets added to allowed_prefixes) When true, users must select from the allowed_prefixes list
ai_prompts: AiPromptConfigAI prompt configuration for customizing AI behavior
baselines: Vec<Baseline>Baselines - named snapshots of requirements at specific points in time
store_version: i64Store version for detecting external modifications (SQLite only) Incremented on each save, used to detect if store was modified externally
migrated_to: Option<String>Migration marker - if set, indicates this YAML was migrated to another format Contains the path to the migrated database (e.g., “requirements.db”) When this is set, opening the YAML should warn/redirect to the migrated database
dispenser: Option<DispenserHandle>Optional external dispenser for ID generation (distributed mode). When set, ID generation delegates to this dispenser instead of using the internal next_spec_number / prefix_counters fields. Skipped in serialization — the dispenser has its own persistence.
Implementations§
Source§impl RequirementsStore
impl RequirementsStore
Sourcepub fn get_type_definition(
&self,
req_type: &RequirementType,
) -> Option<&CustomTypeDefinition>
pub fn get_type_definition( &self, req_type: &RequirementType, ) -> Option<&CustomTypeDefinition>
Gets the type definition for a requirement type
Sourcepub fn get_statuses_for_type(&self, req_type: &RequirementType) -> Vec<String>
pub fn get_statuses_for_type(&self, req_type: &RequirementType) -> Vec<String>
Gets the available statuses for a requirement type
Sourcepub fn get_priorities_for_type(&self, req_type: &RequirementType) -> Vec<String>
pub fn get_priorities_for_type(&self, req_type: &RequirementType) -> Vec<String>
Gets the available priorities for a requirement type
Sourcepub fn get_custom_fields_for_type(
&self,
req_type: &RequirementType,
) -> Vec<CustomFieldDefinition>
pub fn get_custom_fields_for_type( &self, req_type: &RequirementType, ) -> Vec<CustomFieldDefinition>
Gets the custom field definitions for a requirement type
Sourcepub fn is_type_stateless(&self, req_type: &RequirementType) -> bool
pub fn is_type_stateless(&self, req_type: &RequirementType) -> bool
Checks if a requirement type is stateless (no status/priority tracking)
Sourcepub fn get_sprints(&self) -> Vec<&Requirement>
pub fn get_sprints(&self) -> Vec<&Requirement>
Get all Sprints, sorted by sprint_number custom field (if available)
Sourcepub fn get_sprint_items(&self, sprint_id: &Uuid) -> Vec<&Requirement>
pub fn get_sprint_items(&self, sprint_id: &Uuid) -> Vec<&Requirement>
Get items assigned to a specific Sprint via sprint_assignment relationship
Sourcepub fn get_requirement_sprint(&self, req_id: &Uuid) -> Option<&Requirement>
pub fn get_requirement_sprint(&self, req_id: &Uuid) -> Option<&Requirement>
Get the Sprint that a requirement is assigned to (if any)
Sourcepub fn get_backlog(&self) -> Vec<&Requirement>
pub fn get_backlog(&self) -> Vec<&Requirement>
Get backlog items (requirements without Sprint assignment, excluding Sprints and Folders)
Sourcepub fn assign_to_sprint(
&mut self,
req_id: Uuid,
sprint_id: Uuid,
username: &str,
)
pub fn assign_to_sprint( &mut self, req_id: Uuid, sprint_id: Uuid, username: &str, )
Assign a requirement to a Sprint This removes any existing sprint assignment and creates a new one
Sourcepub fn remove_from_sprint(&mut self, req_id: Uuid, username: &str)
pub fn remove_from_sprint(&mut self, req_id: Uuid, username: &str)
Remove a requirement from its Sprint assignment
Sourcepub fn get_used_prefixes(&self) -> Vec<String>
pub fn get_used_prefixes(&self) -> Vec<String>
Gets all unique prefixes currently in use from requirements
Sourcepub fn get_all_prefixes(&self) -> Vec<String>
pub fn get_all_prefixes(&self) -> Vec<String>
Gets all allowed prefixes (combines allowed_prefixes with used prefixes)
Sourcepub fn add_allowed_prefix(&mut self, prefix: &str)
pub fn add_allowed_prefix(&mut self, prefix: &str)
Adds a prefix to the allowed list if not already present
Sourcepub fn remove_allowed_prefix(&mut self, prefix: &str)
pub fn remove_allowed_prefix(&mut self, prefix: &str)
Removes a prefix from the allowed list
Sourcepub fn is_prefix_allowed(&self, prefix: &str) -> bool
pub fn is_prefix_allowed(&self, prefix: &str) -> bool
Checks if a prefix is allowed (always true if restrict_prefixes is false)
Sourcepub fn next_meta_id(&mut self, prefix: &str) -> String
pub fn next_meta_id(&mut self, prefix: &str) -> String
Generates the next meta-type ID for a given prefix (e.g., “$USER” -> “$USER-001”)
Sourcepub fn add_requirement(&mut self, req: Requirement)
pub fn add_requirement(&mut self, req: Requirement)
Adds a requirement to the store
Sourcepub fn add_user_with_id(
&mut self,
name: String,
email: String,
handle: String,
) -> String
pub fn add_user_with_id( &mut self, name: String, email: String, handle: String, ) -> String
Adds a user with auto-generated $USER-XXX spec_id
Sourcepub fn find_user_by_spec_id(&self, spec_id: &str) -> Option<&User>
pub fn find_user_by_spec_id(&self, spec_id: &str) -> Option<&User>
Finds a user by spec_id (e.g., “$USER-001”)
Sourcepub fn find_user_by_spec_id_mut(&mut self, spec_id: &str) -> Option<&mut User>
pub fn find_user_by_spec_id_mut(&mut self, spec_id: &str) -> Option<&mut User>
Finds a user by spec_id (mutable)
Sourcepub fn find_user_by_id(&self, id: &Uuid) -> Option<&User>
pub fn find_user_by_id(&self, id: &Uuid) -> Option<&User>
Finds a user by UUID
Sourcepub fn migrate_users_to_spec_ids(&mut self)
pub fn migrate_users_to_spec_ids(&mut self)
Migrates existing users without spec_id to have $USER-XXX IDs
Sourcepub fn get_user_by_id_mut(&mut self, id: &Uuid) -> Option<&mut User>
pub fn get_user_by_id_mut(&mut self, id: &Uuid) -> Option<&mut User>
Gets a mutable reference to a user by ID
Sourcepub fn remove_user(&mut self, id: &Uuid) -> bool
pub fn remove_user(&mut self, id: &Uuid) -> bool
Removes a user by ID
Sourcepub fn add_team_with_id(
&mut self,
name: String,
description: String,
parent_team_id: Option<Uuid>,
) -> String
pub fn add_team_with_id( &mut self, name: String, description: String, parent_team_id: Option<Uuid>, ) -> String
Adds a team with auto-generated $TEAM-XXX spec_id
Sourcepub fn find_team_by_spec_id(&self, spec_id: &str) -> Option<&Team>
pub fn find_team_by_spec_id(&self, spec_id: &str) -> Option<&Team>
Finds a team by spec_id (e.g., “$TEAM-001”)
Sourcepub fn find_team_by_spec_id_mut(&mut self, spec_id: &str) -> Option<&mut Team>
pub fn find_team_by_spec_id_mut(&mut self, spec_id: &str) -> Option<&mut Team>
Finds a team by spec_id (mutable)
Sourcepub fn find_team_by_id(&self, id: &Uuid) -> Option<&Team>
pub fn find_team_by_id(&self, id: &Uuid) -> Option<&Team>
Finds a team by UUID
Sourcepub fn get_team_by_id_mut(&mut self, id: &Uuid) -> Option<&mut Team>
pub fn get_team_by_id_mut(&mut self, id: &Uuid) -> Option<&mut Team>
Gets a mutable reference to a team by ID
Sourcepub fn remove_team(&mut self, id: &Uuid) -> bool
pub fn remove_team(&mut self, id: &Uuid) -> bool
Removes a team by ID
Sourcepub fn get_child_teams(&self, parent_id: &Uuid) -> Vec<&Team>
pub fn get_child_teams(&self, parent_id: &Uuid) -> Vec<&Team>
Gets child teams for a given parent team
Sourcepub fn get_root_teams(&self) -> Vec<&Team>
pub fn get_root_teams(&self) -> Vec<&Team>
Gets top-level teams (teams without a parent)
Sourcepub fn get_teams_for_user(&self, user_id: &Uuid) -> Vec<&Team>
pub fn get_teams_for_user(&self, user_id: &Uuid) -> Vec<&Team>
Gets all teams a user belongs to
Sourcepub fn would_create_team_cycle(
&self,
team_id: &Uuid,
proposed_parent_id: &Uuid,
) -> bool
pub fn would_create_team_cycle( &self, team_id: &Uuid, proposed_parent_id: &Uuid, ) -> bool
Checks if setting a parent team would create a circular reference
Sourcepub fn migrate_teams_to_spec_ids(&mut self)
pub fn migrate_teams_to_spec_ids(&mut self)
Migrates existing teams without spec_id to have $TEAM-XXX IDs
Sourcepub fn get_requirement_by_id(&self, id: &Uuid) -> Option<&Requirement>
pub fn get_requirement_by_id(&self, id: &Uuid) -> Option<&Requirement>
Gets a requirement by ID
Sourcepub fn get_requirement_by_id_mut(
&mut self,
id: &Uuid,
) -> Option<&mut Requirement>
pub fn get_requirement_by_id_mut( &mut self, id: &Uuid, ) -> Option<&mut Requirement>
Gets a mutable reference to a requirement by ID
Sourcepub fn get_next_feature_number(&mut self) -> u32
pub fn get_next_feature_number(&mut self) -> u32
Gets the next feature number and increments the counter
Sourcepub fn format_feature_with_number(&self, feature_name: &str) -> String
pub fn format_feature_with_number(&self, feature_name: &str) -> String
Formats a feature with number prefix
Sourcepub fn get_feature_names(&self) -> Vec<String>
pub fn get_feature_names(&self) -> Vec<String>
Gets all unique feature names
Sourcepub fn update_feature_name(&mut self, old_name: &str, new_name: &str)
pub fn update_feature_name(&mut self, old_name: &str, new_name: &str)
Updates an existing feature name
Sourcepub fn migrate_features(&mut self)
pub fn migrate_features(&mut self)
Migrate existing features to use numbered prefixes
Sourcepub fn get_requirement_by_spec_id(&self, spec_id: &str) -> Option<&Requirement>
pub fn get_requirement_by_spec_id(&self, spec_id: &str) -> Option<&Requirement>
Gets a requirement by SPEC-ID
Sourcepub fn get_requirement_by_spec_id_mut(
&mut self,
spec_id: &str,
) -> Option<&mut Requirement>
pub fn get_requirement_by_spec_id_mut( &mut self, spec_id: &str, ) -> Option<&mut Requirement>
Gets a mutable reference to a requirement by SPEC-ID
Sourcepub fn assign_spec_ids(&mut self)
pub fn assign_spec_ids(&mut self)
Assigns SPEC-IDs to requirements that don’t have them
Sourcepub fn peek_next_spec_id(&self) -> String
pub fn peek_next_spec_id(&self) -> String
Gets the next SPEC-ID that would be assigned
Sourcepub fn validate_unique_spec_ids(&self) -> Result<()>
pub fn validate_unique_spec_ids(&self) -> Result<()>
Validates that all SPEC-IDs are unique
Sourcepub fn repair_duplicate_spec_ids(&mut self) -> usize
pub fn repair_duplicate_spec_ids(&mut self) -> usize
Repairs duplicate SPEC-IDs by assigning new unique IDs to duplicates Keeps the first occurrence of each SPEC-ID, reassigns duplicates Returns the number of duplicates that were repaired
Sourcepub fn add_requirement_with_spec_id(&mut self, req: Requirement)
pub fn add_requirement_with_spec_id(&mut self, req: Requirement)
Adds a requirement and assigns it a SPEC-ID (legacy method for backward compatibility)
Sourcepub fn migrate_type_definitions(&mut self) -> bool
pub fn migrate_type_definitions(&mut self) -> bool
Migrates type definitions by adding any missing built-in types Returns true if any types were added
Sourcepub fn migrate_id_config_types(&mut self) -> bool
pub fn migrate_id_config_types(&mut self) -> bool
Migrates id_config.requirement_types by adding any missing built-in types This ensures CLI type list shows all built-in types Returns true if any types were added
Sourcepub fn add_feature(
&mut self,
name: &str,
prefix: &str,
) -> Result<FeatureDefinition>
pub fn add_feature( &mut self, name: &str, prefix: &str, ) -> Result<FeatureDefinition>
Add a new feature definition Returns error if the prefix is reserved or already in use
Sourcepub fn get_feature_by_name(&self, name: &str) -> Option<&FeatureDefinition>
pub fn get_feature_by_name(&self, name: &str) -> Option<&FeatureDefinition>
Get a feature by name
Sourcepub fn get_feature_by_prefix(&self, prefix: &str) -> Option<&FeatureDefinition>
pub fn get_feature_by_prefix(&self, prefix: &str) -> Option<&FeatureDefinition>
Get a feature by prefix
Sourcepub fn generate_requirement_id(
&mut self,
feature_prefix: Option<&str>,
type_prefix: Option<&str>,
) -> String
pub fn generate_requirement_id( &mut self, feature_prefix: Option<&str>, type_prefix: Option<&str>, ) -> String
Generate a new requirement ID based on configuration
- feature_prefix: Optional feature prefix (e.g., “AUTH”)
- type_prefix: Optional type prefix (e.g., “FR”)
Sourcepub fn add_requirement_with_id(
&mut self,
req: Requirement,
feature_prefix: Option<&str>,
type_prefix: Option<&str>,
)
pub fn add_requirement_with_id( &mut self, req: Requirement, feature_prefix: Option<&str>, type_prefix: Option<&str>, )
Add a requirement with the new ID system If spec_id is already set, uses that; otherwise generates one If prefix_override is set on the requirement, uses that prefix instead of feature/type
Sourcepub fn get_type_prefix(&self, req_type: &RequirementType) -> Option<String>
pub fn get_type_prefix(&self, req_type: &RequirementType) -> Option<String>
Get the type prefix for a RequirementType enum value Falls back to built-in defaults if the type is not in the database
Sourcepub fn regenerate_spec_id_for_prefix_change(
&mut self,
req_uuid: &Uuid,
new_prefix: Option<&str>,
feature_prefix: Option<&str>,
type_prefix: Option<&str>,
) -> Result<String, String>
pub fn regenerate_spec_id_for_prefix_change( &mut self, req_uuid: &Uuid, new_prefix: Option<&str>, feature_prefix: Option<&str>, type_prefix: Option<&str>, ) -> Result<String, String>
Generate a new spec_id for a requirement with a new prefix override Returns Ok(new_spec_id) if successful, Err if the new ID would conflict
Sourcepub fn is_spec_id_available(
&self,
spec_id: &str,
exclude_uuid: Option<&Uuid>,
) -> bool
pub fn is_spec_id_available( &self, spec_id: &str, exclude_uuid: Option<&Uuid>, ) -> bool
Check if a spec_id is available (not used by any requirement, or only by the given UUID)
Sourcepub fn update_spec_id_for_type_change(
&self,
current_spec_id: Option<&str>,
new_type: &RequirementType,
) -> Option<String>
pub fn update_spec_id_for_type_change( &self, current_spec_id: Option<&str>, new_type: &RequirementType, ) -> Option<String>
Update a requirement’s spec_id when its type changes Replaces the type prefix portion while keeping the number
Sourcepub fn migrate_to_new_id_format(&mut self)
pub fn migrate_to_new_id_format(&mut self)
Migrate all existing SPEC-XXX IDs to the new format This will regenerate all IDs based on the current configuration Requirements with prefix_override will use their override prefix
Sourcepub fn validate_id_config_change(
&self,
new_format: &IdFormat,
new_numbering: &NumberingStrategy,
new_digits: u8,
) -> IdConfigValidation
pub fn validate_id_config_change( &self, new_format: &IdFormat, new_numbering: &NumberingStrategy, new_digits: u8, ) -> IdConfigValidation
Validate proposed changes to ID configuration Returns validation result with error/warning messages
Sourcepub fn get_max_digits_in_use(&self) -> u8
pub fn get_max_digits_in_use(&self) -> u8
Get the maximum number of digits currently used in requirement IDs
Sourcepub fn migrate_ids_to_config(
&mut self,
new_format: IdFormat,
new_numbering: NumberingStrategy,
new_digits: u8,
) -> usize
pub fn migrate_ids_to_config( &mut self, new_format: IdFormat, new_numbering: NumberingStrategy, new_digits: u8, ) -> usize
Migrate requirement IDs to new format/numbering/digits configuration Returns the number of requirements migrated
Sourcepub fn add_requirement_type(
&mut self,
name: &str,
prefix: &str,
description: &str,
) -> Result<()>
pub fn add_requirement_type( &mut self, name: &str, prefix: &str, description: &str, ) -> Result<()>
Add a new requirement type definition
Sourcepub fn add_relationship(
&mut self,
source_id: &Uuid,
rel_type: RelationshipType,
target_id: &Uuid,
bidirectional: bool,
) -> Result<()>
pub fn add_relationship( &mut self, source_id: &Uuid, rel_type: RelationshipType, target_id: &Uuid, bidirectional: bool, ) -> Result<()>
Add a relationship between two requirements
Sourcepub fn add_relationship_with_creator(
&mut self,
source_id: &Uuid,
rel_type: RelationshipType,
target_id: &Uuid,
bidirectional: bool,
created_by: Option<String>,
) -> Result<()>
pub fn add_relationship_with_creator( &mut self, source_id: &Uuid, rel_type: RelationshipType, target_id: &Uuid, bidirectional: bool, created_by: Option<String>, ) -> Result<()>
Add a relationship between two requirements with optional creator info
Sourcepub fn set_relationship(
&mut self,
source_id: &Uuid,
rel_type: RelationshipType,
target_id: &Uuid,
bidirectional: bool,
) -> Result<()>
pub fn set_relationship( &mut self, source_id: &Uuid, rel_type: RelationshipType, target_id: &Uuid, bidirectional: bool, ) -> Result<()>
Set a unique relationship, removing any existing relationship of the same type first This is useful for Parent relationships where a requirement can only have one parent
Sourcepub fn set_relationship_with_creator(
&mut self,
source_id: &Uuid,
rel_type: RelationshipType,
target_id: &Uuid,
bidirectional: bool,
created_by: Option<String>,
) -> Result<()>
pub fn set_relationship_with_creator( &mut self, source_id: &Uuid, rel_type: RelationshipType, target_id: &Uuid, bidirectional: bool, created_by: Option<String>, ) -> Result<()>
Set a unique relationship with creator info, removing any existing relationship of the same type first
Sourcepub fn remove_relationship(
&mut self,
source_id: &Uuid,
rel_type: &RelationshipType,
target_id: &Uuid,
bidirectional: bool,
) -> Result<()>
pub fn remove_relationship( &mut self, source_id: &Uuid, rel_type: &RelationshipType, target_id: &Uuid, bidirectional: bool, ) -> Result<()>
Remove a relationship between two requirements
Sourcepub fn get_relationships(&self, id: &Uuid) -> Vec<(RelationshipType, Uuid)>
pub fn get_relationships(&self, id: &Uuid) -> Vec<(RelationshipType, Uuid)>
Get all relationships for a requirement
Sourcepub fn get_relationships_by_type(
&self,
id: &Uuid,
rel_type: &RelationshipType,
) -> Vec<Uuid>
pub fn get_relationships_by_type( &self, id: &Uuid, rel_type: &RelationshipType, ) -> Vec<Uuid>
Get all relationships of a specific type for a requirement
Sourcepub fn get_relationship_definition(
&self,
name: &str,
) -> Option<&RelationshipDefinition>
pub fn get_relationship_definition( &self, name: &str, ) -> Option<&RelationshipDefinition>
Get a relationship definition by name
Sourcepub fn get_definition_for_type(
&self,
rel_type: &RelationshipType,
) -> Option<&RelationshipDefinition>
pub fn get_definition_for_type( &self, rel_type: &RelationshipType, ) -> Option<&RelationshipDefinition>
Get a relationship definition for a RelationshipType
Sourcepub fn get_relationship_definitions(&self) -> &[RelationshipDefinition]
pub fn get_relationship_definitions(&self) -> &[RelationshipDefinition]
Get all relationship definitions
Sourcepub fn add_relationship_definition(
&mut self,
definition: RelationshipDefinition,
) -> Result<()>
pub fn add_relationship_definition( &mut self, definition: RelationshipDefinition, ) -> Result<()>
Add a new relationship definition
Sourcepub fn update_relationship_definition(
&mut self,
name: &str,
definition: RelationshipDefinition,
) -> Result<()>
pub fn update_relationship_definition( &mut self, name: &str, definition: RelationshipDefinition, ) -> Result<()>
Update an existing relationship definition
Sourcepub fn remove_relationship_definition(&mut self, name: &str) -> Result<()>
pub fn remove_relationship_definition(&mut self, name: &str) -> Result<()>
Remove a relationship definition (only non-built-in)
Sourcepub fn ensure_builtin_relationships(&mut self)
pub fn ensure_builtin_relationships(&mut self)
Ensure built-in relationship definitions exist (call after loading)
Sourcepub fn validate_relationship(
&self,
source_id: &Uuid,
rel_type: &RelationshipType,
target_id: &Uuid,
) -> RelationshipValidation
pub fn validate_relationship( &self, source_id: &Uuid, rel_type: &RelationshipType, target_id: &Uuid, ) -> RelationshipValidation
Validate a proposed relationship
Sourcepub fn get_inverse_type(
&self,
rel_type: &RelationshipType,
) -> Option<RelationshipType>
pub fn get_inverse_type( &self, rel_type: &RelationshipType, ) -> Option<RelationshipType>
Get the inverse relationship type from definitions
Sourcepub fn create_baseline(
&mut self,
name: String,
description: Option<String>,
created_by: String,
) -> &Baseline
pub fn create_baseline( &mut self, name: String, description: Option<String>, created_by: String, ) -> &Baseline
Creates a new baseline from current requirements
Sourcepub fn get_baseline(&self, id: &Uuid) -> Option<&Baseline>
pub fn get_baseline(&self, id: &Uuid) -> Option<&Baseline>
Gets a baseline by ID
Sourcepub fn get_baseline_by_name(&self, name: &str) -> Option<&Baseline>
pub fn get_baseline_by_name(&self, name: &str) -> Option<&Baseline>
Gets a baseline by name
Sourcepub fn delete_baseline(&mut self, id: &Uuid) -> bool
pub fn delete_baseline(&mut self, id: &Uuid) -> bool
Deletes a baseline by ID (if not locked)
Sourcepub fn compare_with_baseline(
&self,
baseline_id: &Uuid,
) -> Option<BaselineComparison>
pub fn compare_with_baseline( &self, baseline_id: &Uuid, ) -> Option<BaselineComparison>
Compares current requirements against a baseline
Sourcepub fn compare_baselines(
&self,
source_id: &Uuid,
target_id: &Uuid,
) -> Option<BaselineComparison>
pub fn compare_baselines( &self, source_id: &Uuid, target_id: &Uuid, ) -> Option<BaselineComparison>
Compares two baselines
Trait Implementations§
Source§impl Clone for RequirementsStore
impl Clone for RequirementsStore
Source§fn clone(&self) -> RequirementsStore
fn clone(&self) -> RequirementsStore
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RequirementsStore
impl Debug for RequirementsStore
Source§impl Default for RequirementsStore
impl Default for RequirementsStore
Source§impl<'de> Deserialize<'de> for RequirementsStore
impl<'de> Deserialize<'de> for RequirementsStore
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>,
Source§impl Serialize for RequirementsStore
impl Serialize for RequirementsStore
Source§impl TS for RequirementsStore
impl TS for RequirementsStore
Source§type WithoutGenerics = RequirementsStore
type WithoutGenerics = RequirementsStore
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or ().
The only requirement for these dummy types is that EXPORT_TO must be None. Read moreSource§type OptionInnerType = RequirementsStore
type OptionInnerType = RequirementsStore
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete() -> String
fn decl_concrete() -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl() -> String
fn decl() -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline() -> String
fn inline() -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened() -> String
fn inline_flattened() -> String
This function will panic if the type cannot be flattened.
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported.The returned path does not include the base directory from
TS_RS_EXPORT_DIR. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies() -> Vec<Dependency>where
Self: 'static,
fn dependencies() -> Vec<Dependency>where
Self: 'static,
Source§fn export() -> Result<(), ExportError>where
Self: 'static,
fn export() -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all() -> Result<(), ExportError>where
Self: 'static,
fn export_all() -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use
TS::export. Read moreSource§fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use
TS::export. Read more