Skip to main content

Capture

Struct Capture 

Source
pub(crate) struct Capture {
    pub(crate) base: String,
    pub(crate) output: String,
    pub(crate) id: String,
    pub(crate) label: String,
    pub(crate) notes: String,
    pub(crate) fallback_config: String,
    pub(crate) status_name: String,
    pub(crate) capture_default_config: bool,
    pub(crate) sanitize: bool,
    pub(crate) print_summary: bool,
    pub(crate) debug: bool,
}
Expand description

The options after parsing, as the C++ CaptureOptions holds them.

Fields§

§base: String

The --base value, or empty to use the only base connected.

§output: String

Output path, or - for stdout.

§id: String

Fixture id, or empty to derive it from the tag type.

§label: String

Fixture label, or empty to use the tag type name.

§notes: String

Free-text notes; omitted from the fixture when empty.

§fallback_config: String

Source-tree default config path written as fallback_ref; omitted when empty.

§status_name: String

Key under statuses for the captured status.

§capture_default_config: bool

Whether to read and include the tag’s configuration (false only with --no-config).

§sanitize: bool

Whether to replace the UUID and source path placeholders.

§print_summary: bool

Whether to print a summary to stderr after writing.

§debug: bool

Whether to log at DEBUG; otherwise logging is off.

Trait Implementations§

Source§

impl From<Cli> for Capture

Source§

fn from(cli: Cli) -> Self

Folds the parsed options into a Capture; --state overrides --status-name.

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<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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.