Skip to main content

ManagerIntentOp

Enum ManagerIntentOp 

Source
pub enum ManagerIntentOp<Id, Source, Format, Change> {
Show 38 variants AddSources { requests: Vec<Source>, }, SetDraft { draft: String, }, InsertText { text: String, }, SetOutputDraft { draft: String, }, SetInputDraft { draft: String, }, SourceMetadata { id: Id, media_id: String, title: Option<String>, }, FormatCatalog { id: Id, event: FormatDiscoveryOp<Format>, }, Rehearsal { id: Id, event: RehearsalObservationOp<Change>, }, Transfer { id: Id, event: TransferObservationOp, }, OpenAddSources {}, SubmitDraft {}, DeleteBeforeCursor {}, DeleteAtCursor {}, MoveCursorLeft {}, MoveCursorRight {}, MoveCursorHome {}, MoveCursorEnd {}, SelectPrevious {}, SelectNext {}, OpenSelected {}, SelectPreviousDetail {}, SelectNextDetail {}, ActivateDetail {}, OpenFormats {}, OpenOutput {}, OpenInput {}, SubmitInput {}, OpenReport {}, ToggleDryRun {}, SubmitOutput {}, Back {}, ApplySelectedSpace {}, SelectPreviousFormat {}, SelectNextFormat {}, DuplicateSelected {}, RemoveSelected {}, RestartSelected {}, SafeExitRequested {},
}
Expand description

Represents one ManagerIntent operation as pure data.

Variants§

§

AddSources

Represents the add_sources operation.

Fields

§requests: Vec<Source>

Carries the requests argument.

§

SetDraft

Represents the set_draft operation.

Fields

§draft: String

Carries the draft argument.

§

InsertText

Represents the insert_text operation.

Fields

§text: String

Carries the text argument.

§

SetOutputDraft

Represents the set_output_draft operation.

Fields

§draft: String

Carries the draft argument.

§

SetInputDraft

Represents the set_input_draft operation.

Fields

§draft: String

Carries the draft argument.

§

SourceMetadata

Represents the source_metadata operation.

Fields

§id: Id

Carries the id argument.

§media_id: String

Carries the media_id argument.

§title: Option<String>

Carries the title argument.

§

FormatCatalog

Represents the format_catalog operation.

Fields

§id: Id

Carries the id argument.

§event: FormatDiscoveryOp<Format>

Carries the event argument.

§

Rehearsal

Represents the rehearsal operation.

Fields

§id: Id

Carries the id argument.

§event: RehearsalObservationOp<Change>

Carries the event argument.

§

Transfer

Represents the transfer operation.

Fields

§id: Id

Carries the id argument.

§event: TransferObservationOp

Carries the event argument.

§

OpenAddSources

Represents the open_add_sources operation.

§

SubmitDraft

Represents the submit_draft operation.

§

DeleteBeforeCursor

Represents the delete_before_cursor operation.

§

DeleteAtCursor

Represents the delete_at_cursor operation.

§

MoveCursorLeft

Represents the move_cursor_left operation.

§

MoveCursorRight

Represents the move_cursor_right operation.

§

MoveCursorHome

Represents the move_cursor_home operation.

§

MoveCursorEnd

Represents the move_cursor_end operation.

§

SelectPrevious

Represents the select_previous operation.

§

SelectNext

Represents the select_next operation.

§

OpenSelected

Represents the open_selected operation.

§

SelectPreviousDetail

Represents the select_previous_detail operation.

§

SelectNextDetail

Represents the select_next_detail operation.

§

ActivateDetail

Represents the activate_detail operation.

§

OpenFormats

Represents the open_formats operation.

§

OpenOutput

Represents the open_output operation.

§

OpenInput

Represents the open_input operation.

§

SubmitInput

Represents the submit_input operation.

§

OpenReport

Represents the open_report operation.

§

ToggleDryRun

Represents the toggle_dry_run operation.

§

SubmitOutput

Represents the submit_output operation.

§

Back

Represents the back operation.

§

ApplySelectedSpace

Represents the apply_selected_space operation.

§

SelectPreviousFormat

Represents the select_previous_format operation.

§

SelectNextFormat

Represents the select_next_format operation.

§

DuplicateSelected

Represents the duplicate_selected operation.

§

RemoveSelected

Represents the remove_selected operation.

§

RestartSelected

Represents the restart_selected operation.

§

SafeExitRequested

Represents the safe_exit_requested operation.

Implementations§

Source§

impl<Id, Source, Format, Change> ManagerIntentOp<Id, Source, Format, Change>

Source

pub fn add_sources(requests: Vec<Source>) -> Self

Constructs the add_sources operation.

Source

pub fn set_draft(draft: String) -> Self

Constructs the set_draft operation.

Source

pub fn insert_text(text: String) -> Self

Constructs the insert_text operation.

Source

pub fn set_output_draft(draft: String) -> Self

Constructs the set_output_draft operation.

Source

pub fn set_input_draft(draft: String) -> Self

Constructs the set_input_draft operation.

Source

pub fn source_metadata(id: Id, media_id: String, title: Option<String>) -> Self

Constructs the source_metadata operation.

Source

pub fn format_catalog(id: Id, event: FormatDiscoveryOp<Format>) -> Self

Constructs the format_catalog operation.

Source

pub fn rehearsal(id: Id, event: RehearsalObservationOp<Change>) -> Self

Constructs the rehearsal operation.

Source

pub fn transfer(id: Id, event: TransferObservationOp) -> Self

Constructs the transfer operation.

Source

pub fn open_add_sources() -> Self

Constructs the open_add_sources operation.

Source

pub fn submit_draft() -> Self

Constructs the submit_draft operation.

Source

pub fn delete_before_cursor() -> Self

Constructs the delete_before_cursor operation.

Source

pub fn delete_at_cursor() -> Self

Constructs the delete_at_cursor operation.

Source

pub fn move_cursor_left() -> Self

Constructs the move_cursor_left operation.

Source

pub fn move_cursor_right() -> Self

Constructs the move_cursor_right operation.

Source

pub fn move_cursor_home() -> Self

Constructs the move_cursor_home operation.

Source

pub fn move_cursor_end() -> Self

Constructs the move_cursor_end operation.

Source

pub fn select_previous() -> Self

Constructs the select_previous operation.

Source

pub fn select_next() -> Self

Constructs the select_next operation.

Source

pub fn open_selected() -> Self

Constructs the open_selected operation.

Source

pub fn select_previous_detail() -> Self

Constructs the select_previous_detail operation.

Source

pub fn select_next_detail() -> Self

Constructs the select_next_detail operation.

Source

pub fn activate_detail() -> Self

Constructs the activate_detail operation.

Source

pub fn open_formats() -> Self

Constructs the open_formats operation.

Source

pub fn open_output() -> Self

Constructs the open_output operation.

Source

pub fn open_input() -> Self

Constructs the open_input operation.

Source

pub fn submit_input() -> Self

Constructs the submit_input operation.

Source

pub fn open_report() -> Self

Constructs the open_report operation.

Source

pub fn toggle_dry_run() -> Self

Constructs the toggle_dry_run operation.

Source

pub fn submit_output() -> Self

Constructs the submit_output operation.

Source

pub fn back() -> Self

Constructs the back operation.

Source

pub fn apply_selected_space() -> Self

Constructs the apply_selected_space operation.

Source

pub fn select_previous_format() -> Self

Constructs the select_previous_format operation.

Source

pub fn select_next_format() -> Self

Constructs the select_next_format operation.

Source

pub fn duplicate_selected() -> Self

Constructs the duplicate_selected operation.

Source

pub fn remove_selected() -> Self

Constructs the remove_selected operation.

Source

pub fn restart_selected() -> Self

Constructs the restart_selected operation.

Source

pub fn safe_exit_requested() -> Self

Constructs the safe_exit_requested operation.

Source

pub fn interpret<Interpreter>( self, interpreter: &mut Interpreter, ) -> ManagerIntentReply
where Interpreter: ManagerIntentInterpreter<Id = Id, Source = Source, Format = Format, Change = Change>,

Interprets this operation with one interpreter and returns its reply.

Trait Implementations§

Source§

impl<Id: Clone, Source: Clone, Format: Clone, Change: Clone> Clone for ManagerIntentOp<Id, Source, Format, Change>

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<Id: Debug, Source: Debug, Format: Debug, Change: Debug> Debug for ManagerIntentOp<Id, Source, Format, Change>

Source§

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

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

impl<Id: Eq, Source: Eq, Format: Eq, Change: Eq> Eq for ManagerIntentOp<Id, Source, Format, Change>

Source§

impl<Id: PartialEq, Source: PartialEq, Format: PartialEq, Change: PartialEq> PartialEq for ManagerIntentOp<Id, Source, Format, Change>

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<Id: PartialEq, Source: PartialEq, Format: PartialEq, Change: PartialEq> StructuralPartialEq for ManagerIntentOp<Id, Source, Format, Change>

Auto Trait Implementations§

§

impl<Id, Source, Format, Change> Freeze for ManagerIntentOp<Id, Source, Format, Change>
where Vec<Source>: Freeze, Id: Freeze, FormatDiscoveryOp<Format>: Freeze, RehearsalObservationOp<Change>: Freeze,

§

impl<Id, Source, Format, Change> RefUnwindSafe for ManagerIntentOp<Id, Source, Format, Change>

§

impl<Id, Source, Format, Change> Send for ManagerIntentOp<Id, Source, Format, Change>
where Vec<Source>: Send, Id: Send, FormatDiscoveryOp<Format>: Send, RehearsalObservationOp<Change>: Send,

§

impl<Id, Source, Format, Change> Sync for ManagerIntentOp<Id, Source, Format, Change>
where Vec<Source>: Sync, Id: Sync, FormatDiscoveryOp<Format>: Sync, RehearsalObservationOp<Change>: Sync,

§

impl<Id, Source, Format, Change> Unpin for ManagerIntentOp<Id, Source, Format, Change>
where Vec<Source>: Unpin, Id: Unpin, FormatDiscoveryOp<Format>: Unpin, RehearsalObservationOp<Change>: Unpin,

§

impl<Id, Source, Format, Change> UnsafeUnpin for ManagerIntentOp<Id, Source, Format, Change>

§

impl<Id, Source, Format, Change> UnwindSafe for ManagerIntentOp<Id, Source, Format, Change>

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<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<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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<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<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.