pub struct Dimension {
pub width: u64,
pub height: u64,
}Expand description
Dimension - width and length - of an image.
Image Size, Attribute, properties.
Fields§
§width: u64width of an image
height: u64length of an image
Implementations§
Source§impl Dimension
impl Dimension
Sourcepub fn new(string: &str) -> WallSwitchResult<Dimension>
pub fn new(string: &str) -> WallSwitchResult<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<'de> Deserialize<'de> for Dimension
impl<'de> Deserialize<'de> for Dimension
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
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