Struct wallswitch::Dimension
source · pub struct Dimension {
pub height: u64,
pub width: u64,
}Expand description
Dimension - width and length - of an image.
Image Size, Attribute, properties.
Fields§
§height: u64length of an image
width: u64width of an image
Implementations§
source§impl Dimension
impl Dimension
sourcepub fn new(string: &str) -> MyResult<Dimension>
pub fn new(string: &str) -> MyResult<Dimension>
Get an instance of Dimension by specifying concrete values for each of the fields.
sourcepub fn is_valid(&self, config: &Config) -> bool
pub fn is_valid(&self, config: &Config) -> bool
Check if the minimum and maximum value are valid.
sourcepub fn get_log_min(&self, config: &Config) -> String
pub fn get_log_min(&self, config: &Config) -> String
Get error messages related to the minimum value.
sourcepub fn get_log_max(&self, config: &Config) -> String
pub fn get_log_max(&self, config: &Config) -> String
Get error messages related to the maximum value.
Trait Implementations§
source§impl Ord for Dimension
impl Ord for Dimension
source§impl PartialOrd for Dimension
impl PartialOrd for Dimension
impl Eq for Dimension
impl StructuralPartialEq for Dimension
Auto Trait Implementations§
impl Freeze for Dimension
impl RefUnwindSafe for Dimension
impl Send for Dimension
impl Sync for Dimension
impl Unpin for Dimension
impl UnwindSafe for Dimension
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)