pub struct PhaseTransitionService { /* private fields */ }
Expand description
Service for managing document phase transitions
Implementations§
Source§impl PhaseTransitionService
impl PhaseTransitionService
Sourcepub fn new<P: AsRef<Path>>(workspace_dir: P) -> Self
pub fn new<P: AsRef<Path>>(workspace_dir: P) -> Self
Create a new phase transition service for a workspace
Sourcepub async fn transition_document(
&self,
document_id: &str,
target_phase: Phase,
) -> Result<TransitionResult>
pub async fn transition_document( &self, document_id: &str, target_phase: Phase, ) -> Result<TransitionResult>
Transition a document to a specific phase
Sourcepub async fn transition_to_next_phase(
&self,
document_id: &str,
) -> Result<TransitionResult>
pub async fn transition_to_next_phase( &self, document_id: &str, ) -> Result<TransitionResult>
Transition a document to the next phase in its natural sequence
Sourcepub fn is_valid_transition(
&self,
doc_type: DocumentType,
from_phase: Phase,
to_phase: Phase,
) -> bool
pub fn is_valid_transition( &self, doc_type: DocumentType, from_phase: Phase, to_phase: Phase, ) -> bool
Check if a phase transition is valid without performing it
Sourcepub fn get_valid_transitions_for(
&self,
doc_type: DocumentType,
from_phase: Phase,
) -> Vec<Phase>
pub fn get_valid_transitions_for( &self, doc_type: DocumentType, from_phase: Phase, ) -> Vec<Phase>
Get all valid transitions for a document type and phase
Auto Trait Implementations§
impl Freeze for PhaseTransitionService
impl RefUnwindSafe for PhaseTransitionService
impl Send for PhaseTransitionService
impl Sync for PhaseTransitionService
impl Unpin for PhaseTransitionService
impl UnwindSafe for PhaseTransitionService
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> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read more