CliArgs

Struct CliArgs 

Source
pub struct CliArgs {
Show 21 fields pub input: Option<String>, pub script: Option<PathBuf>, pub output: Option<String>, pub theme: Option<String>, pub font_family: Option<String>, pub font_size: Option<u32>, pub text_color: Option<String>, pub background_color: Option<String>, pub cursor_char: Option<String>, pub width: Option<u32>, pub height: Option<u32>, pub padding: Option<u32>, pub line_spacing: Option<u32>, pub align: Option<String>, pub v_align: Option<String>, pub speed: Option<String>, pub frame_delay: Option<u32>, pub fade_duration: Option<u32>, pub no_escape: bool, pub list_fonts: bool, pub list_themes: bool,
}
Expand description

Style, layout, theme, and animation configuration. Defines all command-line options for the termcinema binary.

Fieldsยง

ยงinput: Option<String>

Input text (conflicts with โ€“script)

ยงscript: Option<PathBuf>

Script file path (conflicts with โ€“input)

ยงoutput: Option<String>

Output file path (default: stdout)

ยงtheme: Option<String>

Theme name (see โ€“list-themes)

ยงfont_family: Option<String>

Font family name

ยงfont_size: Option<u32>

Font size in pixels

ยงtext_color: Option<String>

Text color (e.g. โ€œ#00FF00โ€)

ยงbackground_color: Option<String>

Background color (e.g. โ€œ#000000โ€)

ยงcursor_char: Option<String>

Cursor character (e.g. โ€œ_โ€)

ยงwidth: Option<u32>

Padding around content (default: 10)

ยงheight: Option<u32>

Line spacing in pixels

ยงpadding: Option<u32>

SVG height in pixels

ยงline_spacing: Option<u32>

SVG width in pixels

ยงalign: Option<String>

Horizontal alignment: left, center, or right

ยงv_align: Option<String>

Vertical alignment: top, middle, or bottom

ยงspeed: Option<String>

Typing speed preset (e.g. โ€œnormalโ€)

ยงframe_delay: Option<u32>

Frame delay per character (ms)

ยงfade_duration: Option<u32>

Fade-in duration per character (ms)

ยงno_escape: bool

Disable escape sequences like \n or \t

ยงlist_fonts: bool

List all built-in fonts

ยงlist_themes: bool

List all built-in themes

Trait Implementationsยง

Sourceยง

impl Args for CliArgs

Sourceยง

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Sourceยง

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Sourceยง

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Sourceยง

impl CommandFactory for CliArgs

Sourceยง

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
Sourceยง

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
Sourceยง

impl Debug for CliArgs

Sourceยง

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

Formats the value using the given formatter. Read more
Sourceยง

impl Default for CliArgs

Provide default arguments for SDKs, playgrounds, or programmatic usage.

These defaults are suitable for embedding scenarios where no CLI is involved. They represent a typical middle-ground layout and animation config.

This implementation is used by default_args() and [render_svg_direct()].

Sourceยง

fn default() -> Self

Returns the โ€œdefault valueโ€ for a type. Read more
Sourceยง

impl FromArgMatches for CliArgs

Sourceยง

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Sourceยง

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Sourceยง

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Sourceยง

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Sourceยง

impl Parser for CliArgs

Sourceยง

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
Sourceยง

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
Sourceยง

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
Sourceยง

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
Sourceยง

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
Sourceยง

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

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.