pub struct ImageConfig {
pub formats: FormatsConfig,
pub display: DisplayConfig,
pub cache: CacheConfig,
pub analysis: AnalysisConfig,
}Expand description
Image support configuration.
Fields§
§formats: FormatsConfigSupported image formats
display: DisplayConfigDisplay settings
cache: CacheConfigCache settings
analysis: AnalysisConfigAnalysis settings
Implementations§
Source§impl ImageConfig
impl ImageConfig
Sourcepub fn from_file(path: &PathBuf) -> ImageResult<Self>
pub fn from_file(path: &PathBuf) -> ImageResult<Self>
Sourcepub fn load_with_hierarchy() -> ImageResult<Self>
pub fn load_with_hierarchy() -> ImageResult<Self>
Load configuration with hierarchy support.
Configuration hierarchy (highest to lowest priority):
- Runtime overrides (not implemented here)
- Project-level config (projects/ricecoder/config/images.yaml)
- User-level config (~/.ricecoder/config/images.yaml)
- Built-in defaults
§Returns
Merged configuration from all available sources
Sourcepub fn is_format_supported(&self, format: &str) -> bool
pub fn is_format_supported(&self, format: &str) -> bool
Check if a format is supported.
Sourcepub fn supported_formats_string(&self) -> String
pub fn supported_formats_string(&self) -> String
Get the list of supported formats as a comma-separated string.
Trait Implementations§
Source§impl Clone for ImageConfig
impl Clone for ImageConfig
Source§fn clone(&self) -> ImageConfig
fn clone(&self) -> ImageConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImageConfig
impl Debug for ImageConfig
Source§impl Default for ImageConfig
impl Default for ImageConfig
Source§impl<'de> Deserialize<'de> for ImageConfig
impl<'de> Deserialize<'de> for ImageConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ImageConfig
impl RefUnwindSafe for ImageConfig
impl Send for ImageConfig
impl Sync for ImageConfig
impl Unpin for ImageConfig
impl UnwindSafe for ImageConfig
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
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().