Skip to main content

Prop

Enum Prop 

Source
#[repr(u8)]
pub enum Prop {
Show 68 variants Gap = 0, Pad = 1, PadX = 2, PadY = 3, Grow = 4, W = 5, Min = 6, Max = 7, H = 8, Border = 9, Bc = 10, Edge = 11, Bleed = 12, Title = 13, TitleAlign = 14, Footer = 15, FooterAlign = 16, Align = 17, VAlign = 18, Justify = 19, Fg = 20, Bg = 21, On = 22, Bold = 23, Dim = 24, Italic = 25, Underline = 26, Reverse = 27, Strike = 28, Wrap = 29, Truncate = 30, Trim = 31, Id = 32, When = 33, Value = 34, Options = 35, Label = 36, Desc = 37, Kind = 38, Step = 39, Multi = 40, Filter = 41, Custom = 42, Mask = 43, Recommended = 44, Open = 45, Required = 46, Match = 47, Src = 48, Icon = 49, Badge = 50, Submit = 51, Cancel = 52, Confirm = 53, Placeholder = 54, Angle = 55, Accent = 56, Vertical = 57, Anim = 58, Ease = 59, Spin = 60, Hover = 61, Lift = 62, Focus = 63, Guides = 64, Status = 65, Shimmer = 66, Reveal = 67,
}
Expand description

A well-known component property.

The markup attribute name of every variant is its kebab-cased ident (PadXpad-x), parsed by Props::prop_of and emitted by Display; VAlign alone overrides the derived v-align to keep the established valign.

Variants§

§

Gap = 0

Space between adjacent children.

§

Pad = 1

Shorthand padding applied to both axes.

§

PadX = 2

Horizontal inner padding.

§

PadY = 3

Vertical inner padding.

§

Grow = 4

Flexible share of remaining layout space.

§

W = 5

Preferred width in cells or percent.

§

Min = 6

Minimum width or numeric field value.

§

Max = 7

Maximum width or numeric field value.

§

H = 8

Preferred height in rows.

§

Border = 9

Border glyph family.

§

Bc = 10

Border color or gradient.

§

Edge = 11

Alternate name for the border color or gradient.

§

Bleed = 12

Extends the background through border cells.

§

Title = 13

Display title for a container or step.

§

TitleAlign = 14

Horizontal placement of the border title.

§

Footer = 15

Display footer on a framed container’s bottom edge.

§

FooterAlign = 16

Horizontal placement of the border footer.

§

Align = 17

Horizontal content alignment.

§

VAlign = 18

Vertical content alignment.

§

Justify = 19

Distribution of children along the layout axis.

§

Fg = 20

Foreground color, theme token, or gradient.

§

Bg = 21

Background color, theme token, or gradient.

§

On = 22

Shorthand background color, theme token, or gradient.

§

Bold = 23

Enables bold text.

§

Dim = 24

Enables dim text.

§

Italic = 25

Enables italic text.

§

Underline = 26

Enables underlined text.

§

Reverse = 27

Swaps foreground and background colors.

§

Strike = 28

Enables struck-through text.

§

Wrap = 29

Enables wrapping rows; on text, a value selects the wrapping mode.

§

Truncate = 30

Enables text truncation.

§

Trim = 31

Crops transparent image margins before cell sampling.

§

Id = 32

Stable identifier used by updates and conditions.

§

When = 33

Visibility condition referencing another component value.

§

Value = 34

Initial or submitted field value.

§

Options = 35

Space-delimited choices for a selection field.

§

Label = 36

User-facing field or item label.

§

Desc = 37

Supporting description for an option.

§

Kind = 38

Field control kind.

§

Step = 39

Numeric increment or wizard step metadata.

§

Multi = 40

Enables multiple selection.

§

Filter = 41

Enables interactive option filtering.

§

Custom = 42

Allows values outside the listed options.

§

Mask = 43

Obscures input contents.

§

Recommended = 44

Marks an option as the recommended default.

§

Open = 45

Expands a tree node initially.

§

Required = 46

Requires a nonempty field value.

§

Match = 47

Pattern that a field value must satisfy.

§

Src = 48

Image or external content source.

§

Icon = 49

Leading icon name.

§

Badge = 50

Compact status label.

§

Submit = 51

Emits a submit event when activated.

§

Cancel = 52

Emits a cancel event when activated.

§

Confirm = 53

Requires a second activation before committing.

§

Placeholder = 54

Hint shown by an empty input.

§

Angle = 55

Gradient direction in screen degrees.

§

Accent = 56

Applies accent styling to an action.

§

Vertical = 57

Selects vertical rendering where supported.

§

Anim = 58

Transition duration for animatable properties.

§

Ease = 59

Easing curve applied to anim transitions.

§

Spin = 60

Gradient rotation period.

§

Hover = 61

Border color or gradient applied while the pointer rests on the component or one of its descendants.

§

Lift = 62

Rows the component rises toward while hovered.

§

Focus = 63

Opts the component into the keyboard focus ring.

§

Guides = 64

Tree guide connector family; a bare flag selects the square set.

§

Status = 65

Task lifecycle state on a todo item.

§

Shimmer = 66

Sweep period of the brightness crest across text content.

§

Reveal = 67

Catch-up horizon for progressively revealed streamed text.

Implementations§

Source§

impl Prop

Source

pub const fn from_repr(discriminant: u8) -> Option<Prop>

Try to create Self from the raw representation

Trait Implementations§

Source§

impl Clone for Prop

Source§

fn clone(&self) -> Prop

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Prop

Source§

impl Debug for Prop

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Prop

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for Prop

Source§

impl FromStr for Prop

Source§

type Err = ParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Prop, <Self as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl IntoEnumIterator for Prop

Source§

type Iterator = PropIter

Source§

fn iter() -> PropIter

Source§

impl PartialEq for Prop

Source§

fn eq(&self, other: &Prop) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Prop

Source§

impl TryFrom<&str> for Prop

Source§

type Error = ParseError

The type returned in the event of a conversion error.
Source§

fn try_from(s: &str) -> Result<Prop, <Self as TryFrom<&str>>::Error>

Performs the conversion.
Source§

impl TrySparseIndex for Prop

Source§

type Error = PropIndexError

The error type returned when index conversion fails.
Source§

fn index(&self) -> usize

Returns the index for this value.
Source§

fn try_from_index(index: usize) -> Result<Self, Self::Error>

Attempts to convert an index to this type. Read more
Source§

fn from_index(index: usize) -> Self

Converts an index to this type, assuming the index is valid. Read more
Source§

fn validate_sorted( indices: impl DoubleEndedIterator<Item = usize>, ) -> Result<(), Self::Error>

Validates that every index in a sorted iterator is valid for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Prop

§

impl RefUnwindSafe for Prop

§

impl Send for Prop

§

impl Sync for Prop

§

impl Unpin for Prop

§

impl UnsafeUnpin for Prop

§

impl UnwindSafe for Prop

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.