Skip to main content

ManagerState

Struct ManagerState 

Source
pub struct ManagerState { /* private fields */ }
Expand description

Denotes the complete renderer-neutral manager application state.

Implementations§

Source§

impl ManagerState

Source

pub const fn downloads() -> Self

Constructs the downloads collection page.

Source

pub const fn page(&self) -> ManagerPage<QueueId>

Observes the current page.

Source

pub fn queue(&self) -> &[QueueEntry]

Observes queue entries in collection order.

Source

pub const fn selected_id(&self) -> Option<QueueId>

Observes the selected stable identity.

Source

pub const fn detail_control(&self) -> Option<DetailControl>

Observes the selected visible details control.

Source

pub fn selected(&self) -> Option<&QueueEntry>

Observes the selected entry.

Source

pub fn entry(&self, id: QueueId) -> Option<&QueueEntry>

Observes one entry by stable identity.

Source

pub fn draft(&self) -> &str

Observes the add-sources editor draft.

Source

pub fn output_draft(&self) -> &str

Observes the output-file-name editor draft.

Source

pub fn message(&self) -> Option<&str>

Observes the manager status message.

Source

pub fn waiting(&self) -> impl Iterator<Item = &QueueEntry>

Observes all waiting entries in collection order.

Source

pub fn first_waiting_format_catalog(&self) -> Option<&QueueEntry>

Observes the first format inspection waiting for an interpreter.

Source

pub fn has_active_transfer(&self) -> bool

Observes whether any transfer is active.

Source§

impl ManagerState

Source

pub fn transfer_request(&mut self, id: QueueId)

Makes one request a transfer, the way a submitted line naming two ends does.

A submitted line states what a request is; this is how a test states one without a line that would.

Trait Implementations§

Source§

impl Clone for ManagerState

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ManagerState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl DetailSelectionAlg for ManagerState

Source§

fn selected_detail_control(&self) -> Option<DetailControl>

Observes the selected details control.
Source§

fn set_selected_detail_control(&mut self, control: Option<DetailControl>)

Sets the selected details control.
Source§

impl DownloadCollectionAlg for ManagerState

Source§

fn add_sources(self, sources: impl IntoIterator<Item = Self::Source>) -> Self

Appends source requests in declaration order.
Source§

impl DownloadLogAlg for ManagerState

Source§

fn note_download(&mut self, id: Self::Id, note: String)

Appends one note to the record of one stable identity.
Source§

impl DraftStateAlg for ManagerState

Source§

fn draft(&self) -> &str

Observes the current editor draft.
Source§

fn set_draft(&mut self, draft: String)

Replaces the editor draft.
Source§

impl FormatCatalogStateAlg for ManagerState

Source§

fn request_format_catalog(&mut self, id: Self::Id)

Marks one editable entry as waiting for source inspection.
Source§

fn apply_format_catalog_event( &mut self, id: Self::Id, event: FormatDiscoveryOp<Self::Format>, )

Applies one format-catalog observation.
Source§

impl InputDraftAlg for ManagerState

Source§

fn input_draft(&self) -> &str

Observes the input editor draft.
Source§

fn set_input_draft(&mut self, draft: String)

Replaces the input editor draft.
Source§

impl ManagerSorts for ManagerState

Source§

type Id = QueueId

Represents one stable queue identity.
Source§

type Source = SourceRequest

Represents one submitted source.
Source§

type Options = DownloadOptions

Represents the options fixed for one request.
Source§

type Output = Option<PathBuf>

Represents one chosen output.
Source§

type Format = Format

Represents one selectable format description.
Source§

type Change = PlannedChange

Represents one change a rehearsal states.
Source§

type Entry = QueueEntry

Represents one observable queue entry.
Source§

type Downloads = ()

Represents the downloads collection.
Source§

impl ManagerStatusAlg for ManagerState

Source§

fn manager_message(&self) -> Option<&str>

Observes the manager status message while one stands.
Source§

fn set_manager_message(&mut self, message: Option<String>)

Sets or clears the manager status message.
Source§

impl MediaOptionsAlg for ManagerState

Source§

fn progressive(&self) -> Self::Options

Defines a progressive request containing both audio and video.
Source§

fn audio(&self) -> Self::Options

Defines an audio-only request.
Source§

fn video(&self) -> Self::Options

Defines a video-only request.
Source§

impl NavigationStateAlg for ManagerState

Source§

fn page(&self) -> ManagerPage<Self::Id>

Observes the current page.
Source§

fn set_page(&mut self, page: ManagerPage<Self::Id>)

Sets the current page.
Source§

impl OutputChoiceAlg for ManagerState

Source§

fn suggested_output(&self) -> Self::Output

Defines output naming derived from extracted media meaning.
Source§

fn exact_output(&self, path: impl Into<PathBuf>) -> Self::Output

Defines an exact output path.
Source§

impl OutputDraftAlg for ManagerState

Source§

fn output_draft(&self) -> &str

Observes the output-file-name editor draft.
Source§

fn set_output_draft(&mut self, draft: String)

Replaces the output-file-name editor draft.
Source§

impl PartialEq for ManagerState

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl QueueAppendAlg for ManagerState

Source§

fn append_sources(&mut self, requests: Vec<Self::Source>) -> Vec<Self::Id>

Appends sources and returns their stable identities in source order.
Source§

impl QueueCatalogAlg for ManagerState

Source§

fn queue_ids(&self) -> impl Iterator<Item = Self::Id>

Observes stable identities in collection order.
Source§

fn selected_queue_id(&self) -> Option<Self::Id>

Observes the selected stable identity.
Source§

fn set_selected_queue_id(&mut self, selected: Option<Self::Id>)

Sets the selected stable identity.
Source§

fn queue_entry(&self, id: Self::Id) -> Option<&Self::Entry>

Observes one entry by stable identity.
Source§

impl QueueDryRunAlg for ManagerState

Source§

fn set_queue_dry_run(&mut self, id: Self::Id, dry_run: bool)

Turns the rehearsal mode of one request on or off.
Source§

impl QueueDuplicateAlg for ManagerState

Source§

fn duplicate_queue_entry(&mut self, id: Self::Id) -> Option<Self::Id>

Duplicates one source as a fresh request and returns its identity.
Source§

impl QueueFormatEditAlg for ManagerState

Source§

fn cycle_queue_format(&mut self, id: Self::Id, forward: bool)

Selects an adjacent choice: a preferred stream role, or one discovered identity.
Source§

impl QueueOutputAlg for ManagerState

Source§

fn set_queue_output(&mut self, id: Self::Id, output: PathBuf)

Fixes one editable queue entry’s explicit output file name.
Source§

impl QueuePauseAlg for ManagerState

Source§

fn toggle_queue_pause(&mut self, id: Self::Id)

Toggles one active transfer between paused and resumed state.
Source§

impl QueueRemoveAlg for ManagerState

Source§

fn remove_queue_entry(&mut self, id: Self::Id)

Removes one stable identity.
Source§

impl QueueSourceAlg for ManagerState

Source§

fn set_queue_source(&mut self, id: Self::Id, source: String)

Replaces one request’s input, while that request still permits it.
Source§

impl RehearsalStateAlg for ManagerState

Source§

fn apply_rehearsal_event( &mut self, id: Self::Id, event: RehearsalObservationOp<Self::Change>, )

Applies one rehearsal observation.
Source§

impl SafeExitAlg for ManagerState

Source§

fn exit_requested(&self) -> bool

Observes whether safe exit was requested.
Source§

fn request_safe_exit(&mut self)

Records a safe-exit request.
Source§

impl SourceMetadataAlg for ManagerState

Source§

fn apply_source_metadata( &mut self, id: Self::Id, media_id: String, title: Option<String>, )

Applies extracted identity and title observations.
Source§

impl SourceRecognitionAlg for ManagerState

Source§

fn recognizes_source(&self, line: &str) -> bool

States whether some source retrieves what the line names.
Source§

impl SourceRequestAlg for ManagerState

Source§

fn source( &self, input: impl Into<String>, output: Self::Output, options: Self::Options, ) -> Self::Source

Defines one source request with explicit download options.
Source§

impl StructuralPartialEq for ManagerState

Source§

impl SubmissionAlg for ManagerState

Source§

fn submitted(&self, line: &str) -> Self::Source

Defines the request one submitted line names.
Source§

impl TextEditorStateAlg for ManagerState

Source§

fn active_text_editor(&self) -> Option<(&str, usize)>

Observes active text and its UTF-8 byte cursor.
Source§

fn set_active_text_editor(&mut self, text: String, cursor: usize)

Replaces active text and its UTF-8 byte cursor.
Source§

impl TransferStateAlg for ManagerState

Source§

fn set_waiting(&mut self, id: Self::Id)

Marks one entry as waiting for an interpreter.
Source§

fn restart_waiting(&mut self, id: Self::Id)

Marks one failed entry as waiting without changing its fixed request.
Source§

fn apply_transfer_event(&mut self, id: Self::Id, event: TransferObservationOp)

Applies one transfer observation.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<This> AttentionLaws<This> for This

Source§

fn attention_laws(&mut self) -> Result<(), Error>

Checks what the collection states to whoever is doing the work it asks for.

The laws checked are:

  1. exactly the requests waiting for an interpreter want work done;
  2. a request whose work has begun is no longer waiting for it;
  3. a request being worked on wants its run, a paused one wants it held, and a removed one wants none;
  4. once the reader is leaving, no request wants its run;
  5. a destination is taken exactly while another request is writing to it.
§Errors

Returns the first violated law.

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<This> BreadcrumbExt<This> for This

Source§

fn breadcrumbs(&self) -> Vec<Breadcrumb>

Derives one breadcrumb per page the current page rests under, the collection first.

Source§

fn entry_label(&self, id: <This as ManagerSorts>::Id) -> &str

Observes what one identity denotes, or that the collection no longer holds it.

Source§

impl<This> ChoiceEditingExt<This> for This

Source§

fn open_report(&mut self)

Opens the report of what the selected request would do.

Source§

fn open_log(&mut self)

Opens the record of what was observed about the selected request.

Source§

fn open_command(&mut self)

Opens the command the selected request would run, stated whole.

Source§

fn toggle_dry_run(&mut self)

Turns the rehearsal mode of the selected request on or off.

A request that states no rehearsal mode has none to turn, so the intention denotes nothing.

Source§

fn open_formats(&mut self)

Opens format selection only while the selected request is editable.

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<This> CollectionNavigationExt<This> for This

Source§

fn select_relative(&mut self, forward: bool)

Selects the adjacent entry with collection-end wraparound.

Source§

fn remove_selected(&mut self)

Removes selection and chooses its nearest remaining neighbor.

Source§

impl<This> DetailNavigationExt<This> for This

Source§

fn select_detail(&mut self, forward: bool)

Selects an adjacent expanded-row position, including the row itself.

Source§

fn normalize_detail_control(&mut self, id: <This as ManagerSorts>::Id)

Keeps row focus and replaces a detail cursor that is no longer meaningful.

Source§

impl<This> DraftLaws<This> for This

Source§

fn draft_laws(&mut self) -> Result<(), Error>

Checks that a draft is observed back and submits exactly the sources it names.

The laws checked are:

  1. a draft is observed back exactly as it was replaced;
  2. the source draft and the output-name draft are independent;
  3. submitting adds the non-blank trimmed lines in draft order and nothing else;
  4. submitting clears the draft and denotes the collection;
  5. submitting a draft naming no source adds nothing and moves no focus.
§Errors

Returns the first violated law.

Source§

impl<This> DraftSubmissionExt<This> for This

Source§

fn add_sources(&mut self, requests: Vec<<This as ManagerSorts>::Source>)

Adds requests, focuses the first new identity, and clears stale status.

Source§

fn submit_draft(&mut self)

Submits non-empty trimmed draft lines as progressive requests.

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<This> GaugeLaws<This> for This

Source§

fn gauge_laws(&self) -> Result<(), Error>

Checks that a gauge states a share without claiming more resolution than it has.

The laws checked are:

  1. a gauge occupies its stated width whatever share it states;
  2. no share is stated as filled before it is reached, and none is stated twice;
  3. nothing stated is nothing filled, and everything stated fills the whole track;
  4. the stated text occupies exactly one cell per counted cell.
§Errors

Returns the first violated law.

Source§

impl<This> IntentLaws<This> for This

Source§

fn intent_laws(&mut self) -> Result<(), Error>

Checks that each intention denotes exactly the meaning derived for it.

The laws checked are:

  1. the selection intentions denote derived collection navigation;
  2. expanding and returning is the identity on page and selection;
  3. the editing intentions denote the derived cursor operations;
  4. an intention addressed to one identity leaves the others unobserved.
§Errors

Returns the first violated law.

Source§

fn law_entry_shape( &self, id: <This as ManagerSorts>::Id, ) -> Option<(Vec<DetailControl>, Option<SpaceAction>)>

Observes one entry through exactly what the specification exposes about it.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<This> IntoExt<This> for This

Source§

fn to<R>(self) -> R
where 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

Source§

fn try_collect_vec<T, E>(self) -> Result<Vec<T>, E>
where This: Iterator<Item = Result<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>,

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>
where This: IntoIterator<Item = Result<(A, 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> KeyBindingExt<This> for This
where This: NavigationStateAlg,

Source§

fn page_bindings( &self, ) -> impl Iterator<Item = KeyBinding<<This as ManagerSorts>::Id, <This as ManagerSorts>::Source, <This as ManagerSorts>::Format, <This as ManagerSorts>::Change>>

States every keystroke the current page binds, cursor movement first.

Typed scalars are not bound here: on an editor page every scalar the table leaves free denotes insertion, which is one rule rather than one binding per character.

Source§

fn keystroke_meaning( &self, stroke: Keystroke, ) -> Option<KeyBinding<<This as ManagerSorts>::Id, <This as ManagerSorts>::Source, <This as ManagerSorts>::Format, <This as ManagerSorts>::Change>>

States what one keystroke denotes on the current page.

Exit is bound on every page. Any other modified keystroke denotes nothing, so a chord the terminal reports is never mistaken for the unmodified key inside it.

Source§

fn typed_meaning( &self, typed: char, ) -> Option<KeyBinding<<This as ManagerSorts>::Id, <This as ManagerSorts>::Source, <This as ManagerSorts>::Format, <This as ManagerSorts>::Change>>

States what one typed scalar denotes on the current page.

Source§

fn paste_meaning( &self, text: &str, ) -> Option<KeyBinding<<This as ManagerSorts>::Id, <This as ManagerSorts>::Source, <This as ManagerSorts>::Format, <This as ManagerSorts>::Change>>

States what pasted text denotes on the current page.

Source§

fn page_accepts_text(&self) -> bool

Observes whether the current page holds a text draft free scalars belong to.

Source§

fn action_keys(&self, action: ManagerAction) -> impl Iterator<Item = Keystroke>

States the keys reaching one action on the current page, the primary key first.

Source§

impl<This> KeyBindingLaws<This> for This

Source§

fn key_binding_laws(&mut self) -> Result<(), Error>

Checks that every page binds its keys unambiguously and admits nothing it did not bind.

The laws checked are:

  1. no two bindings on one page are reached by the same keystroke;
  2. every keystroke a page binds denotes that binding;
  3. exit is bound on every page, and no other modified keystroke denotes anything;
  4. typed scalars denote insertion exactly on the pages holding a draft;
  5. a gated binding whose action has no meaning leaves the manager as it was.
§Errors

Returns the first violated law.

Source§

impl<This> KeyInputExt<This> for This

Source§

fn apply_keystroke(&mut self, stroke: Keystroke) -> bool

Applies what one keystroke denotes, and observes whether it denoted anything.

A gated binding applies only while its action has meaning, so a disabled menu entry and a pressed key refuse the same intention.

Source§

fn apply_paste(&mut self, text: &str) -> bool

Applies what pasted text denotes, and observes whether it denoted anything.

Source§

fn apply_binding( &mut self, binding: KeyBinding<<This as ManagerSorts>::Id, <This as ManagerSorts>::Source, <This as ManagerSorts>::Format, <This as ManagerSorts>::Change>, ) -> bool

Applies one binding while the action gating it has meaning.

Source§

impl<This> LogLaws<This> for This

Source§

fn log_laws(&mut self) -> Result<(), Error>

Checks that the record is keyed, ordered, and reachable from the entry it describes.

The laws checked are:

  1. a note reaches exactly the identity it addresses;
  2. notes are observed in the order they were stated;
  3. every entry offers its record among its details controls;
  4. activating that control denotes the record of that identity.
§Errors

Returns the first violated law.

Source§

fn law_notes( &self, id: <This as ManagerSorts>::Id, ) -> Result<Vec<String>, Error>

Observes the notes stated about one identity.

§Errors

Returns a violation when the collection holds no such identity.

Source§

impl<This> ManagerAttentionExt<This> for This

Source§

fn wanting_work(&self) -> Vec<<This as ManagerSorts>::Id>

States every request waiting for an interpreter to do what it asks, in collection order.

Source§

fn wanted(&self, id: <This as ManagerSorts>::Id) -> Wanted

States what one request wants of the run working on its behalf.

Source§

fn rehearses(&self, id: <This as ManagerSorts>::Id) -> bool

States whether one request asks for a rehearsal rather than for the thing itself.

Source§

fn begun(&mut self, id: <This as ManagerSorts>::Id, holdable: bool)

States that a run has begun, as the kind of run the request asks for.

A rehearsal moves nothing and is over when it has said what it would do, so it is never told that it could be held still.

Source§

fn ran_for(&mut self, id: <This as ManagerSorts>::Id, elapsed: Duration)

States how long one run has been running, when the request counts that.

A rehearsal moves nothing, so how long it took states nothing about a transfer.

Source§

fn refused(&mut self, id: <This as ManagerSorts>::Id, detail: &str)

States that one run refused, as the kind of run the request asks for.

Source§

fn performed( &mut self, id: <This as ManagerSorts>::Id, destination: PathBuf, changes: Vec<<This as ManagerSorts>::Change>, )

States what one finished run did, as the kind of run the request asks for.

A rehearsal states what it would have changed. A transfer states that it is done, and how much it moved, which is what its changes add up to.

Source§

fn destination_is_taken(&self, id: <This as ManagerSorts>::Id) -> bool

States whether another request is already writing where this one would write.

Two runs writing one path would each publish over the other, and which of them a reader ends up with is decided by whichever finished last. The collection knows both, so it is the collection that states the clash rather than whoever happens to be running them.

Source§

fn entry_phase(&self, id: <This as ManagerSorts>::Id) -> Option<TransferPhase>

Observes the phase one request has reached, while the collection still holds it.

Source§

impl<This> ManagerIntentExt<This> for This

Source§

fn apply_manager_event( &mut self, event: ManagerIntentOp<<This as ManagerSorts>::Id, <This as ManagerSorts>::Source, <This as ManagerSorts>::Format, <This as ManagerSorts>::Change>, )

Applies one manager intention or external observation. Applies one manager intention through the generated fold.

Source§

impl<This> ManagerLawAuthoring<This> for This

Source§

fn author_law_queue(&mut self, count: usize) -> Vec<<This as ManagerSorts>::Id>

Authors the stated number of media requests and observes the identities they were given.

The requests are stated rather than submitted: what a line reads as is what one interpreter recognizes, and a scenario about the collection is not about that.

Source§

impl<This> ManagerMenuExt<This> for This

Source§

fn action_availability(&self, action: ManagerAction) -> ActionAvailability

Derives whether one reusable action currently has meaning.

Source§

fn cursor_can_move(&self, forward: bool) -> bool

Derives whether the current page cursor can move in one direction.

Source§

fn selection_can_activate(&self) -> bool

Derives whether the current cursor position denotes an activatable value.

Source§

impl<This> ManagerScreenExt<This> for This

Source§

fn screen<Syntax>( &self, syntax: &Syntax, application: Application<'_>, ) -> <Syntax as ScreenSyntax>::Screen
where Syntax: ScreenSyntax,

States the whole screen the current page denotes.

Source§

fn header_line<Syntax>( &self, syntax: &Syntax, application: Application<'_>, ) -> <Syntax as ScreenSyntax>::Line
where Syntax: ScreenSyntax,

States what the current page belongs to and the path that reached it.

Source§

fn footer_line<Syntax>(&self, syntax: &Syntax) -> <Syntax as ScreenSyntax>::Line
where Syntax: ScreenSyntax,

States every menu entry the page offers, the unavailable ones stated quietly.

Source§

fn body<Syntax>(&self, syntax: &Syntax) -> <Syntax as ScreenSyntax>::Body
where Syntax: ScreenSyntax,

States what the current page holds.

Source§

fn collection_body<Syntax>( &self, syntax: &Syntax, expanded: Option<<This as ManagerSorts>::Id>, ) -> <Syntax as ScreenSyntax>::Body
where Syntax: ScreenSyntax,

States the collection, one row per request, at most one of them expanded.

Source§

fn compact_row<Syntax>( &self, syntax: &Syntax, id: <This as ManagerSorts>::Id, entry: &<This as ManagerSorts>::Entry, ) -> <Syntax as ScreenSyntax>::Row
where Syntax: ScreenSyntax,

States one request in one line: how far it has come, what it is, and where it stands.

Source§

fn expanded_row<Syntax>( &self, syntax: &Syntax, id: <This as ManagerSorts>::Id, entry: &<This as ManagerSorts>::Entry, ) -> <Syntax as ScreenSyntax>::Row
where Syntax: ScreenSyntax,

States everything one request holds, and everything that can be done to it.

Source§

fn input_line<Syntax>( &self, syntax: &Syntax, id: <This as ManagerSorts>::Id, entry: &<This as ManagerSorts>::Entry, ) -> <Syntax as ScreenSyntax>::Line
where Syntax: ScreenSyntax,

States where the request comes from, or the draft renaming that.

Source§

fn output_line<Syntax>( &self, syntax: &Syntax, id: <This as ManagerSorts>::Id, entry: &<This as ManagerSorts>::Entry, ) -> <Syntax as ScreenSyntax>::Line
where Syntax: ScreenSyntax,

States where the request will be published, or the draft renaming it.

Source§

fn format_choice_parts( &self, entry: &<This as ManagerSorts>::Entry, ) -> (String, String)

States what the request chose: what it is called, and what choosing it does.

A choice a reader would not recognize by name says what it does, and says it right after its name: the two are one phrase, and a column between them would break it in half.

Source§

fn command_body<Syntax>( &self, syntax: &Syntax, id: <This as ManagerSorts>::Id, ) -> <Syntax as ScreenSyntax>::Body
where Syntax: ScreenSyntax,

States the whole command one request would run, and nothing else.

Source§

fn transfer_summary_text(&self, entry: &<This as ManagerSorts>::Entry) -> String

States what a transfer has moved and how quickly, in one phrase.

Source§

fn formats_body<Syntax>( &self, syntax: &Syntax, id: <This as ManagerSorts>::Id, ) -> <Syntax as ScreenSyntax>::Body
where Syntax: ScreenSyntax,

States the choices one request offers: the roles first, then everything discovered.

Source§

fn chosen_choice_row( &self, entry: &<This as ManagerSorts>::Entry, discovered: bool, ) -> usize

States which offered row the request’s current choice rests on.

Source§

fn report_body<Syntax>( &self, syntax: &Syntax, id: <This as ManagerSorts>::Id, ) -> <Syntax as ScreenSyntax>::Body
where Syntax: ScreenSyntax,

States what the rehearsal said one request would do.

Source§

fn record_body<Syntax>( &self, syntax: &Syntax, id: <This as ManagerSorts>::Id, ) -> <Syntax as ScreenSyntax>::Body
where Syntax: ScreenSyntax,

States everything observed about one request, in the order it was observed.

Source§

fn draft_body<Syntax>(&self, syntax: &Syntax) -> <Syntax as ScreenSyntax>::Body
where Syntax: ScreenSyntax,

States the sources draft under edit, and the shapes a source may be written in.

Source§

impl<This> MenuLaws<This> for This

Source§

fn menu_laws(&mut self) -> Result<(), Error>

Checks that availability is derived from page, selection, and queue observations.

The laws checked are:

  1. an empty collection enables only the actions that still have meaning;
  2. a selected ready entry enables Space, Remove, and activation;
  3. cursor movement is enabled exactly when the page holds another value to move to;
  4. activation on the add-sources page is enabled exactly when the draft names a source;
  5. a disabled action denotes no operation, so applying it changes nothing observable.
§Errors

Returns the first violated law.

Source§

fn law_space( &self, id: <This as ManagerSorts>::Id, ) -> Result<Option<SpaceAction>, Error>

Observes one entry’s Space meaning by stable identity.

§Errors

Returns a violation when the collection holds no such identity.

Source§

impl<This> MenuPresentationExt<This> for This

Source§

fn menu_items(&self) -> impl Iterator<Item = MenuItem>

States every entry the current page offers, in the order a reader scans them.

Exit closes every menu, because it is the one action every page offers.

Source§

fn menu_item(&self, action: ManagerAction, verb: impl Into<String>) -> MenuItem

States one entry naming one action, with the keys the page binds to it.

Source§

fn cursor_item(&self, verb: impl Into<String>) -> MenuItem

States the one entry walking a list, which both cursor directions reach.

Source§

fn choice_verb(&self, id: <This as ManagerSorts>::Id) -> &'static str

Names what the chooser page chooses between for one request.

Source§

fn space_verb(&self) -> String

Names what Space would do to the selected entry, whether or not it is offered.

Source§

impl<This> MenuPresentationLaws<This> for This

Source§

fn menu_presentation_laws(&mut self) -> Result<(), Error>

Checks that the menu states what the keys actually do.

The laws checked are:

  1. every menu entry states at least one key, and states it in brackets;
  2. every key a menu entry states denotes an action on that page;
  3. every page offers exit, and offers it last;
  4. a menu entry is stated as unavailable exactly when its action has no meaning.
§Errors

Returns the first violated law.

Source§

impl<This> NavigationLaws<This> for This

Source§

fn navigation_laws(&mut self) -> Result<(), Error>

Checks that selection, expansion, and removal preserve stable queue identity.

The laws checked are:

  1. adding sources focuses the first new identity;
  2. selection advances in collection order and wraps at both ends;
  3. expanded details name the selected identity and move with it;
  4. removing the selected entry chooses a remaining neighbor;
  5. removing an expanded entry denotes the collection again;
  6. breadcrumbs are rooted at the collection and name the expanded identity.
§Errors

Returns the first violated law.

Source§

impl<This> OutputEditingExt<This> for This

Source§

fn open_input(&mut self)

Opens input editing only while the selected request still permits its input to change.

A request whose input was already read — extracted, described, named after — no longer permits it: changing the input then would make everything derived from it a lie.

Source§

fn submit_input(&mut self)

Applies a non-empty input draft.

Source§

fn open_output(&mut self)

Opens output-file-name editing only while the selected request is editable.

Source§

fn submit_output(&mut self)

Applies a non-empty output draft, as the kind of name the request states it is.

Source§

impl<This> QueueLaws<This> for This

Source§

fn queue_laws(&mut self) -> Result<(), Error>

Checks that observations are keyed and that derived progress follows only from them.

The laws checked are:

  1. an observation updates exactly the identity it addresses;
  2. byte rate, remaining time, and completed share are derived from bytes and elapsed time;
  3. full byte progress denotes publication, while only terminal success denotes completion;
  4. the submitted source is the label until extraction supplies a title.
§Errors

Returns the first violated law.

Source§

fn law_entry( &self, id: <This as ManagerSorts>::Id, ) -> Result<&<This as ManagerSorts>::Entry, Error>

Observes one entry by stable identity.

§Errors

Returns a violation when the collection holds no such identity.

Source§

fn law_transferred(&self, id: <This as ManagerSorts>::Id) -> Option<u64>

Observes the bytes one identity has retrieved, when it names an entry.

Source§

impl<This> QueueLifecycleExt<This> for This

Source§

fn apply_selected_space(&mut self)

Applies the selected entry’s state-dependent Space transition.

Space names a collection entry, so it denotes nothing while another page is current.

Source§

fn duplicate_selected(&mut self)

Duplicates selection as a fresh editable identity and opens its details.

Source§

fn restart_selected(&mut self)

Restarts the selected failed request with its fixed options.

Source§

impl<This> TextCursorExt<This> for This
where This: TextEditorStateAlg,

Source§

fn insert_text(&mut self, insertion: &str)

Inserts text at the active cursor and advances past the insertion.

Source§

fn delete_before_cursor(&mut self)

Deletes the Unicode scalar immediately preceding the active cursor.

Source§

fn delete_at_cursor(&mut self)

Deletes the Unicode scalar at the active cursor.

Source§

fn move_cursor_left(&mut self)

Moves the active cursor one Unicode scalar to the left.

Source§

fn move_cursor_right(&mut self)

Moves the active cursor one Unicode scalar to the right.

Source§

fn move_cursor_home(&mut self)

Moves the active cursor to the beginning of its logical line.

Source§

fn move_cursor_end(&mut self)

Moves the active cursor to the end of its logical line.

Source§

impl<This> TextLaws<This> for This

Source§

fn text_editor_laws(&mut self) -> Result<(), Error>

Checks that editing moves by Unicode scalar and never splits one.

The laws checked are:

  1. the cursor moves by whole scalars in both directions;
  2. insertion advances past exactly the inserted bytes;
  3. deleting before and at the cursor removes one whole scalar;
  4. every observed cursor rests on a UTF-8 boundary.
§Errors

Returns the first violated law.

Source§

fn check_law_editor(&self, text: &str, cursor: usize) -> Result<(), Error>

Checks the observed text and cursor against the meaning one edit denotes.

§Errors

Returns the violated law.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<This> TransitionLaws<This> for This

Source§

fn transition_laws(&mut self) -> Result<(), Error>

Checks that Space, restart, duplication, and output editing denote their transitions.

The laws checked are:

  1. Space schedules exactly the selected ready entry and fixes its request;
  2. pause is offered only while the active interpreter advertises that capability;
  3. a failed request offers restart and restarts without becoming editable again;
  4. duplication creates a fresh editable identity with its own transfer state;
  5. an extracted title is the default output stem;
  6. an output name is editable before first start and normalized when applied.
§Errors

Returns the first violated law.

Source§

fn law_entry( &self, id: <This as ManagerSorts>::Id, ) -> Result<&<This as ManagerSorts>::Entry, Error>

Observes one entry by stable identity.

§Errors

Returns a violation when the collection holds no such identity.

Source§

fn law_space( &self, id: <This as ManagerSorts>::Id, ) -> Result<Option<SpaceAction>, Error>

Observes the Space meaning one identity currently offers.

§Errors

Returns a violation when the collection holds no such identity.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.