pub trait DraftLaws<This>where
This: NavigationStateAlg + QueueCatalogAlg + QueueAppendAlg + DraftStateAlg + OutputDraftAlg + InputDraftAlg + ManagerStatusAlg + SourceRequestAlg + SubmissionAlg + MediaOptionsAlg + OutputChoiceAlg,
This::Entry: QueueEntryAlg,
This::Id: Copy + Eq + Debug,{
// Required method
fn draft_laws(&mut self) -> Result<()>;
}Expand description
Authors the editor-draft laws.
Required Methods§
Sourcefn draft_laws(&mut self) -> Result<()>
fn draft_laws(&mut self) -> Result<()>
Checks that a draft is observed back and submits exactly the sources it names.
The laws checked are:
- a draft is observed back exactly as it was replaced;
- the source draft and the output-name draft are independent;
- submitting adds the non-blank trimmed lines in draft order and nothing else;
- submitting clears the draft and denotes the collection;
- submitting a draft naming no source adds nothing and moves no focus.
§Errors
Returns the first violated law.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<This> DraftLaws<This> for Thiswhere
This: NavigationStateAlg + QueueCatalogAlg + QueueAppendAlg + DraftStateAlg + OutputDraftAlg + InputDraftAlg + ManagerStatusAlg + SourceRequestAlg + SubmissionAlg + MediaOptionsAlg + OutputChoiceAlg,
This::Entry: QueueEntryAlg,
This::Id: Copy + Eq + Debug,
Authors the editor-draft laws.