pub enum DebugLength {
Auto,
Px(f32),
Fill,
Percent(f32),
}Expand description
Serializable declarative length used by size hints and flex basis.
§Examples
use ailloli_ui_devtools_core::DebugLength;
let length = DebugLength::Percent(0.5);
assert_eq!(serde_json::to_string(&length).unwrap(), r#"{"kind":"Percent","value":0.5}"#);Variants§
Auto
Intrinsic sizing.
Px(f32)
Fixed logical pixels, stored verbatim.
Fill
Fill/remaining-space sizing.
Percent(f32)
Fraction of parent available space, where 0.5 means 50%.
Trait Implementations§
Source§impl Clone for DebugLength
impl Clone for DebugLength
Source§fn clone(&self) -> DebugLength
fn clone(&self) -> DebugLength
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 DebugLength
impl Debug for DebugLength
Source§impl<'de> Deserialize<'de> for DebugLength
impl<'de> Deserialize<'de> for DebugLength
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 From<Length> for DebugLength
Preserves the exact core length variant and payload.
impl From<Length> for DebugLength
Preserves the exact core length variant and payload.
Source§impl PartialEq for DebugLength
impl PartialEq for DebugLength
Source§impl Serialize for DebugLength
impl Serialize for DebugLength
impl Copy for DebugLength
impl StructuralPartialEq for DebugLength
Auto Trait Implementations§
impl Freeze for DebugLength
impl RefUnwindSafe for DebugLength
impl Send for DebugLength
impl Sync for DebugLength
impl Unpin for DebugLength
impl UnwindSafe for DebugLength
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,
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.