pub struct ResponsiveValue<T: Clone> { /* private fields */ }Expand description
A value that varies based on breakpoint
Implementations§
Source§impl<T: Clone> ResponsiveValue<T>
impl<T: Clone> ResponsiveValue<T>
Sourcepub fn resolve(&self, breakpoints: &Breakpoints, width: u16) -> T
pub fn resolve(&self, breakpoints: &Breakpoints, width: u16) -> T
Resolve value for current width
Sourcepub fn default_value(&self) -> &T
pub fn default_value(&self) -> &T
Get the default value
Trait Implementations§
Source§impl<T: Clone + Clone> Clone for ResponsiveValue<T>
impl<T: Clone + Clone> Clone for ResponsiveValue<T>
Source§fn clone(&self) -> ResponsiveValue<T>
fn clone(&self) -> ResponsiveValue<T>
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 moreAuto Trait Implementations§
impl<T> Freeze for ResponsiveValue<T>where
T: Freeze,
impl<T> RefUnwindSafe for ResponsiveValue<T>where
T: RefUnwindSafe,
impl<T> Send for ResponsiveValue<T>where
T: Send,
impl<T> Sync for ResponsiveValue<T>where
T: Sync,
impl<T> Unpin for ResponsiveValue<T>where
T: Unpin,
impl<T> UnsafeUnpin for ResponsiveValue<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ResponsiveValue<T>where
T: UnwindSafe,
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