pub struct QueueEntry { /* private fields */ }Expand description
Denotes one source in the in-memory manager collection.
Implementations§
Source§impl QueueEntry
impl QueueEntry
Sourcepub const fn transfer(&self) -> &TransferState
pub const fn transfer(&self) -> &TransferState
Observes transfer state.
Sourcepub const fn options(&self) -> &DownloadOptions
pub const fn options(&self) -> &DownloadOptions
Observes choices fixed when execution first starts.
Sourcepub const fn formats(&self) -> &FormatCatalog
pub const fn formats(&self) -> &FormatCatalog
Observes discovered selectable formats.
Sourcepub fn is_editable(&self) -> bool
pub fn is_editable(&self) -> bool
Observes whether request choices remain editable.
Sourcepub fn detail_controls(&self) -> Vec<DetailControl>
pub fn detail_controls(&self) -> Vec<DetailControl>
Derives visible details controls from transfer state.
Sourcepub fn space_action(&self) -> Option<SpaceAction>
pub fn space_action(&self) -> Option<SpaceAction>
Derives the currently valid meaning of Space.
Sourcepub fn transfer_command(&self) -> Option<SyncCommand>
pub fn transfer_command(&self) -> Option<SyncCommand>
States exactly the command an interpreter would run to perform this request.
Only a transfer is performed by naming a program. The command is derived from the two ends, the way of transferring, and the rehearsal mode, so changing any of them changes it. An interpreter runs this command, and a reader reads this command: one derivation, so what is shown and what is run cannot drift apart.
Sourcepub fn stated_command(&self) -> Option<String>
pub fn stated_command(&self) -> Option<String>
States what an interpreter would run, as a reader reads it.
Sourcepub fn log(&self) -> impl DoubleEndedIterator<Item = &str>
pub fn log(&self) -> impl DoubleEndedIterator<Item = &str>
Observes the notes stated about this request, in the order they were stated.
Trait Implementations§
Source§impl Clone for QueueEntry
impl Clone for QueueEntry
Source§impl Debug for QueueEntry
impl Debug for QueueEntry
Source§impl FormatChoiceViewAlg for QueueEntry
impl FormatChoiceViewAlg for QueueEntry
Source§fn discovery(&self) -> DiscoveryState<'_>
fn discovery(&self) -> DiscoveryState<'_>
Source§fn described_formats(&self) -> impl Iterator<Item = &Self::Format>
fn described_formats(&self) -> impl Iterator<Item = &Self::Format>
Source§impl PartialEq for QueueEntry
impl PartialEq for QueueEntry
Source§impl QueueEntryAlg for QueueEntry
impl QueueEntryAlg for QueueEntry
Source§fn label(&self) -> &str
fn label(&self) -> &str
Source§fn phase(&self) -> TransferPhase
fn phase(&self) -> TransferPhase
Source§fn dry_run(&self) -> Option<bool>
fn dry_run(&self) -> Option<bool>
Source§fn output_naming(&self) -> OutputNaming
fn output_naming(&self) -> OutputNaming
Source§fn stated_command(&self) -> Option<String>
fn stated_command(&self) -> Option<String>
Source§fn is_editable(&self) -> bool
fn is_editable(&self) -> bool
Source§fn detail_controls(&self) -> Vec<DetailControl>
fn detail_controls(&self) -> Vec<DetailControl>
Source§fn download_log(&self) -> impl Iterator<Item = &str>
fn download_log(&self) -> impl Iterator<Item = &str>
Source§fn space_action(&self) -> Option<SpaceAction>
fn space_action(&self) -> Option<SpaceAction>
Source§impl RehearsalViewAlg for QueueEntry
impl RehearsalViewAlg for QueueEntry
Source§type Change = PlannedChange
type Change = PlannedChange
Source§fn rehearsal(&self) -> RehearsalState<'_>
fn rehearsal(&self) -> RehearsalState<'_>
Source§fn planned_changes(&self) -> impl Iterator<Item = &Self::Change>
fn planned_changes(&self) -> impl Iterator<Item = &Self::Change>
Source§impl RequestOptionsAlg for QueueEntry
impl RequestOptionsAlg for QueueEntry
Source§fn media_streams(&self) -> Option<MediaStreams>
fn media_streams(&self) -> Option<MediaStreams>
Source§fn chosen_choice(&self) -> Option<&str>
fn chosen_choice(&self) -> Option<&str>
impl StructuralPartialEq for QueueEntry
Source§impl TransferViewAlg for QueueEntry
impl TransferViewAlg for QueueEntry
Source§fn transferred(&self) -> u64
fn transferred(&self) -> u64
Source§fn transfer_total(&self) -> Option<u64>
fn transfer_total(&self) -> Option<u64>
Source§fn transfer_elapsed(&self) -> Duration
fn transfer_elapsed(&self) -> Duration
Source§fn transfer_complete(&self) -> bool
fn transfer_complete(&self) -> bool
Source§fn transfer_destination(&self) -> Option<&Path>
fn transfer_destination(&self) -> Option<&Path>
Source§fn transfer_summary(&self) -> Option<&str>
fn transfer_summary(&self) -> Option<&str>
Source§fn transfer_detail(&self) -> Option<&str>
fn transfer_detail(&self) -> Option<&str>
Auto Trait Implementations§
impl Freeze for QueueEntry
impl RefUnwindSafe for QueueEntry
impl Send for QueueEntry
impl Sync for QueueEntry
impl Unpin for QueueEntry
impl UnsafeUnpin for QueueEntry
impl UnwindSafe for QueueEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<This> FormatRolesExt<This> for This
impl<This> FormatRolesExt<This> for This
Source§fn offered_streams(&self) -> Vec<MediaStreams>
fn offered_streams(&self) -> Vec<MediaStreams>
States the roles some described format carries, and every role while none are described.
A chooser offers what can be chosen. Asking for sound alone from a source that only ever states one file carrying both would select nothing at all, so a role no format carries is not offered at all. Before anything is described there is nothing to rule out, and every role stands.
Source§impl<This> GaugeLaws<This> for This
impl<This> GaugeLaws<This> for This
Source§fn gauge_laws(&self) -> Result<(), Error>
fn gauge_laws(&self) -> Result<(), Error>
Checks that a gauge states a share without claiming more resolution than it has.
The laws checked are:
- a gauge occupies its stated width whatever share it states;
- no share is stated as filled before it is reached, and none is stated twice;
- nothing stated is nothing filled, and everything stated fills the whole track;
- the stated text occupies exactly one cell per counted cell.
§Errors
Returns the first violated law.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<This> IntoExt<This> for This
impl<This> IntoExt<This> for This
Source§fn to<R>(self) -> Rwhere
This: Into<R>,
fn to<R>(self) -> Rwhere
This: Into<R>,
A version of Into::into function that can be used to explicitly specify the target
conversion type.
use alux_sdk::*;
// `Into` requires context to infer the type,
let _: i64 = Into::into(42_i8);
// The opposite `From` requires context to infer the type,
let _: i64 = From::from(42_i8);
// `.to()` can be used in the same way as a postfix function (the same as `.into()`),
let _: i64 = 42_i8.to();
// but also with the type specified explicitly.
let _ = 42_i8.to::<i64>();
// Especially useful to chain multiple conversions inline.
let _: i64 = 42_i8.to::<i16>().to::<i32>().into();Source§impl<This> IntoIteratorExt<This> for This
impl<This> IntoIteratorExt<This> for This
Source§fn try_collect_vec<T, E>(self) -> Result<Vec<T>, E>
fn try_collect_vec<T, E>(self) -> Result<Vec<T>, E>
A variant of the try_collect and collect_vec combined function from the Itertools
library. The materialized value is a Vec inside a Result object.
Returns the first error without collecting later values.
use alux_sdk::*;
let values = [Ok::<_, &str>(1), Ok(2), Ok(3)]
.into_iter()
.try_collect_vec();
assert_eq!(values, Ok(vec![1, 2, 3]));Source§fn collect_exact<T>(self, n: usize) -> Option<Vec<T>>where
This: Iterator<Item = T>,
fn collect_exact<T>(self, n: usize) -> Option<Vec<T>>where
This: Iterator<Item = T>,
Takes exactly n elements from the iterator.
Returns Some(Vec<T>) if the iterator yields exactly n elements,
otherwise returns None.
use alux_sdk::*;
let v = [1, 2, 3];
assert_eq!(v.iter().copied().collect_exact(3), Some(vec![1, 2, 3]));
assert_eq!(v.iter().copied().collect_exact(4), None);
assert_eq!(v.iter().copied().collect_exact(2), None);Source§fn try_unzip<A, B, E>(self) -> Result<(Vec<A>, Vec<B>), E>
fn try_unzip<A, B, E>(self) -> Result<(Vec<A>, Vec<B>), E>
Efficiently splits an iterator of Result<(A, B), E> into two Vecs, short-circuiting on error.
Consumes the iterator, collecting all A elements into one vector and all B elements into another,
without first allocating an intermediate vector of tuples. Returns the tuple (Vec<A>, Vec<B>) on success,
or the first error encountered.
use alux_sdk::*;
let input = vec![Ok((1, "x")), Ok((2, "y"))];
let (xs, ys) = input.try_unzip::<_, _, ()>().unwrap();
assert_eq!(xs, vec![1, 2]);
assert_eq!(ys, vec!["x", "y"]);Source§impl<This> TransferProgressExt<This> for Thiswhere
This: TransferViewAlg,
impl<This> TransferProgressExt<This> for Thiswhere
This: TransferViewAlg,
Source§fn bytes_per_second(&self) -> Option<u64>
fn bytes_per_second(&self) -> Option<u64>
Derives average retrieved bytes per second once progress has duration.
Source§fn estimated_remaining(&self) -> Option<Duration>
fn estimated_remaining(&self) -> Option<Duration>
Derives remaining time from average progress once the expected byte count is known.