pub struct AuthoringPermit<'a> { /* private fields */ }Expand description
A borrowed decision, deliberately neither Clone nor Serialize. It is usable only while the host holds current state. Reauthorize every action; do not cache permits or release the owner lock before the operation commits.
Implementations§
Source§impl AuthoringPermit<'_>
impl AuthoringPermit<'_>
pub fn action(&self) -> AuthoringAction
pub fn principal_subject(&self) -> &str
pub fn target(&self) -> &DocumentRevision
Source§impl AuthoringPermit<'_>
impl AuthoringPermit<'_>
Sourcepub fn contribution_record(
self,
id: &str,
description: &str,
effort_minutes: u32,
work_status: WorkStatus,
predecessor: Option<&ContributionRecord>,
) -> Result<ContributionRecord, AuthoringError>
pub fn contribution_record( self, id: &str, description: &str, effort_minutes: u32, work_status: WorkStatus, predecessor: Option<&ContributionRecord>, ) -> Result<ContributionRecord, AuthoringError>
Call only after authoring succeeded, while the host’s transaction still owns this current revision. The owner persists/deduplicates this record atomically with its source journal. Caller cannot attribute another author.
pub fn review_record( self, id: &str, decision: ReviewDecision, rationale: &str, decision_evidence_ref: &str, ) -> Result<ReviewRecord, AuthoringError>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for AuthoringPermit<'a>
impl<'a> RefUnwindSafe for AuthoringPermit<'a>
impl<'a> Send for AuthoringPermit<'a>
impl<'a> Sync for AuthoringPermit<'a>
impl<'a> Unpin for AuthoringPermit<'a>
impl<'a> UnsafeUnpin for AuthoringPermit<'a>
impl<'a> UnwindSafe for AuthoringPermit<'a>
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