Struct sic::cli::config::ConfigBuilder
source · pub struct ConfigBuilder<'a> { /* private fields */ }
Expand description
Builder for [crate::config::Config]. Should be used with the Default implementation
of [crate::config::Config].
If the default trait is not used with this builder, some settings may be inaccessible.
For example, output_path
can be set to some value, but not unset.
Builder is consuming.
Implementations§
source§impl<'a> ConfigBuilder<'a>
impl<'a> ConfigBuilder<'a>
pub fn new() -> Self
pub fn mode(self, mode: InputOutputModeType) -> ConfigBuilder<'a>
pub fn show_license_text_of( self, selection: SelectedLicenses ) -> ConfigBuilder<'a>
pub fn select_frame(self, frame: Option<FrameIndex>) -> ConfigBuilder<'a>
pub fn forced_output_format(self, format: &'a str) -> ConfigBuilder<'a>
pub fn disable_automatic_color_type_adjustment( self, toggle: bool ) -> ConfigBuilder<'a>
pub fn jpeg_quality(self, quality: u8) -> ConfigBuilder<'a>
pub fn pnm_format_type(self, use_ascii: bool) -> ConfigBuilder<'a>
pub fn gif_repeat(self, repeat: RepeatAnimation) -> ConfigBuilder<'a>
pub fn image_output_format_decider_fallback( self, enable_fallback: bool ) -> ConfigBuilder<'a>
pub fn image_operations_program(self, program: Vec<Instr>) -> ConfigBuilder<'a>
pub fn build(self) -> Config<'a>
Trait Implementations§
source§impl<'a> Debug for ConfigBuilder<'a>
impl<'a> Debug for ConfigBuilder<'a>
source§impl<'a> Default for ConfigBuilder<'a>
impl<'a> Default for ConfigBuilder<'a>
source§fn default() -> ConfigBuilder<'a>
fn default() -> ConfigBuilder<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> RefUnwindSafe for ConfigBuilder<'a>
impl<'a> Send for ConfigBuilder<'a>
impl<'a> Sync for ConfigBuilder<'a>
impl<'a> Unpin for ConfigBuilder<'a>
impl<'a> UnwindSafe for ConfigBuilder<'a>
Blanket Implementations§
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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
Mutably borrows from an owned value. Read more
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere R: Read + ReadEndian<P>, P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.§impl<Src> TryFrom<Src> for Src
impl<Src> TryFrom<Src> for Src
§impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
impl<Src, Dst> TryInto<Dst> for Srcwhere Dst: TryFrom<Src>,
§impl<Src> ValueFrom<Src> for Src
impl<Src> ValueFrom<Src> for Src
§fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.