pub trait QueueLaws<This>where
This: NavigationStateAlg + QueueCatalogAlg + QueueAppendAlg + TransferStateAlg + SourceMetadataAlg + DraftStateAlg + ManagerStatusAlg + SourceRequestAlg + SubmissionAlg + MediaOptionsAlg + OutputChoiceAlg,
This::Entry: QueueEntryAlg + TransferViewAlg,
This::Id: Copy + Eq + Debug,{
// Required methods
fn queue_laws(&mut self) -> Result<()>;
fn law_entry(&self, id: This::Id) -> Result<&This::Entry>;
fn law_transferred(&self, id: This::Id) -> Option<u64>;
}Expand description
Authors the keyed-transfer laws.
Required Methods§
Sourcefn queue_laws(&mut self) -> Result<()>
fn queue_laws(&mut self) -> Result<()>
Checks that observations are keyed and that derived progress follows only from them.
The laws checked are:
- an observation updates exactly the identity it addresses;
- byte rate, remaining time, and completed share are derived from bytes and elapsed time;
- full byte progress denotes publication, while only terminal success denotes completion;
- the submitted source is the label until extraction supplies a title.
§Errors
Returns the first violated law.
Sourcefn law_entry(&self, id: This::Id) -> Result<&This::Entry>
fn law_entry(&self, id: This::Id) -> Result<&This::Entry>
Observes one entry by stable identity.
§Errors
Returns a violation when the collection holds no such identity.
Sourcefn law_transferred(&self, id: This::Id) -> Option<u64>
fn law_transferred(&self, id: This::Id) -> Option<u64>
Observes the bytes one identity has retrieved, when it names an entry.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<This> QueueLaws<This> for Thiswhere
This: NavigationStateAlg + QueueCatalogAlg + QueueAppendAlg + TransferStateAlg + SourceMetadataAlg + DraftStateAlg + ManagerStatusAlg + SourceRequestAlg + SubmissionAlg + MediaOptionsAlg + OutputChoiceAlg,
This::Entry: QueueEntryAlg + TransferViewAlg,
This::Id: Copy + Eq + Debug,
Authors the keyed-transfer laws.