Enum thyme::WidthRelative
source · pub enum WidthRelative {
Normal,
Children,
Parent,
Text,
}
Expand description
What to compute the width of a widget relative to.
Variants§
Normal
Width is equal to the x
field of the widget’s size
.
Children
Width is sized so that the widget’s inner width just encompasses all child widgets, plus the x
field
of the widget’s size
. Note that any children of this Widget should not use Parent
width if this
is used.
Parent
Width is equal to the parent widget’s inner width plus the x
field of the widget’s size
.
Text
Width is equal to the text layout width plus the x
field of the widget’s size
.
Trait Implementations§
source§impl Clone for WidthRelative
impl Clone for WidthRelative
source§fn clone(&self) -> WidthRelative
fn clone(&self) -> WidthRelative
Returns a copy 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 WidthRelative
impl Debug for WidthRelative
source§impl Default for WidthRelative
impl Default for WidthRelative
source§fn default() -> WidthRelative
fn default() -> WidthRelative
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for WidthRelative
impl<'de> Deserialize<'de> for WidthRelative
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 Hash for WidthRelative
impl Hash for WidthRelative
source§impl PartialEq<WidthRelative> for WidthRelative
impl PartialEq<WidthRelative> for WidthRelative
source§fn eq(&self, other: &WidthRelative) -> bool
fn eq(&self, other: &WidthRelative) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for WidthRelative
impl Serialize for WidthRelative
impl Copy for WidthRelative
impl Eq for WidthRelative
impl StructuralEq for WidthRelative
impl StructuralPartialEq for WidthRelative
Auto Trait Implementations§
impl RefUnwindSafe for WidthRelative
impl Send for WidthRelative
impl Sync for WidthRelative
impl Unpin for WidthRelative
impl UnwindSafe for WidthRelative
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> Content for Twhere
T: Copy,
impl<T> Content for Twhere T: Copy,
source§unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>where
F: FnOnce(&mut T) -> Result<(), E>,
unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>where F: FnOnce(&mut T) -> Result<(), E>,
Prepares an output buffer, then turns this buffer into an
Owned
.
User-provided closure F
must only write to and not read from &mut Self
.source§fn get_elements_size() -> usize
fn get_elements_size() -> usize
Returns the size of each element.
source§fn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
Produces a pointer to the data.
source§fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.