pub enum ZoomFitError {
RegionSizeXZero,
RegionSizeYZero,
OutputSizeXZero,
OutputSizeYZero,
LogarithmConversionError(TryFromIntError),
ZoomLevelError(ZoomLevelError),
}Expand description
Errors that can occur when trying to find the correct zoom level to fit regions into an output image of a given size
Variants§
RegionSizeXZero
The region size in the x direction can not be zero
RegionSizeYZero
The region size in the y direction can not be zero
OutputSizeXZero
The output image size in the x direction can not be zero
OutputSizeYZero
The output image size in the y direction can not be zero
LogarithmConversionError(TryFromIntError)
Error converting a logarithm value into a u8 (should never happen)
ZoomLevelError(ZoomLevelError)
Error creating the zoom level from the calculated value (should never happen)
Implementations§
Source§impl ZoomFitError
impl ZoomFitError
Sourcepub const fn is_region_size_x_zero(&self) -> bool
pub const fn is_region_size_x_zero(&self) -> bool
Returns true if the enum is ZoomFitError::RegionSizeXZero otherwise false
Sourcepub const fn is_region_size_y_zero(&self) -> bool
pub const fn is_region_size_y_zero(&self) -> bool
Returns true if the enum is ZoomFitError::RegionSizeYZero otherwise false
Sourcepub const fn is_output_size_x_zero(&self) -> bool
pub const fn is_output_size_x_zero(&self) -> bool
Returns true if the enum is ZoomFitError::OutputSizeXZero otherwise false
Sourcepub const fn is_output_size_y_zero(&self) -> bool
pub const fn is_output_size_y_zero(&self) -> bool
Returns true if the enum is ZoomFitError::OutputSizeYZero otherwise false
Sourcepub const fn is_logarithm_conversion_error(&self) -> bool
pub const fn is_logarithm_conversion_error(&self) -> bool
Returns true if the enum is ZoomFitError::LogarithmConversionError otherwise false
Sourcepub const fn is_zoom_level_error(&self) -> bool
pub const fn is_zoom_level_error(&self) -> bool
Returns true if the enum is ZoomFitError::ZoomLevelError otherwise false
Trait Implementations§
Source§impl Clone for ZoomFitError
impl Clone for ZoomFitError
Source§fn clone(&self) -> ZoomFitError
fn clone(&self) -> ZoomFitError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more