MaskedInputState

Struct MaskedInputState 

Source
pub struct MaskedInputState {
Show 17 fields pub area: Rect, pub inner: Rect, pub rendered: Size, pub compact: bool, pub offset: u32, pub dark_offset: (u16, u16), pub scroll_to_cursor: Rc<Cell<bool>>, pub value: TextCore<TextString>, pub sym: Option<NumberSymbols>, pub mask: Vec<MaskToken>, pub invalid: bool, pub overwrite: Rc<Cell<bool>>, pub on_focus_gained: Rc<Cell<TextFocusGained>>, pub on_focus_lost: Rc<Cell<TextFocusLost>>, pub focus: FocusFlag, pub mouse: MouseFlags, pub non_exhaustive: NonExhaustive,
}
Expand description

State & event-handling.

Fields§

§area: Rect

The whole area with block. read only renewed with each render.

§inner: Rect

Area inside a possible block. read only renewed with each render.

§rendered: Size

Rendered dimension. This may differ from (inner.width, inner.height) if the text area has been relocated.

§compact: bool

Widget has been rendered in compact mode. __read only: renewed with each render.

§offset: u32

Display offset read+write

§dark_offset: (u16, u16)

Dark offset due to clipping. Always set during rendering. read only ignore this value.

§scroll_to_cursor: Rc<Cell<bool>>§value: TextCore<TextString>

Editing core

§sym: Option<NumberSymbols>

Editing core read only

§mask: Vec<MaskToken>

Editing core read only

§invalid: bool

Display as invalid. read only use set_invalid

§overwrite: Rc<Cell<bool>>

The next user edit clears the text for doing any edit. It will reset this flag. Other interactions may reset this flag too. read only use set_overwrite

§on_focus_gained: Rc<Cell<TextFocusGained>>

Focus behaviour. read only use on_focus_gained

§on_focus_lost: Rc<Cell<TextFocusLost>>

Focus behaviour. read only use on_focus_lost

§focus: FocusFlag

Current focus state. read+write

§mouse: MouseFlags

Mouse selection in progress. read+write

§non_exhaustive: NonExhaustive

Construct with ..Default::default()

Implementations§

Source§

impl MaskedInputState

Source

pub fn new() -> MaskedInputState

Source

pub fn named(name: &str) -> MaskedInputState

Source

pub fn with_symbols(self, sym: NumberSymbols) -> MaskedInputState

With localized symbols for number formatting.

Source

pub fn with_mask<S>(self, mask: S) -> Result<MaskedInputState, Error>
where S: AsRef<str>,

With input mask.

Source

pub fn set_num_symbols(&mut self, sym: NumberSymbols)

Set symbols for number display.

These are only used for rendering and to map user input. The value itself uses “.”, “,” and “-”.

Source

pub fn set_mask<S>(&mut self, s: S) -> Result<(), Error>
where S: AsRef<str>,

Set the input mask. This overwrites the display mask and the value with a default representation of the mask.

The result value contains all punctuation and the value given as ‘display’ below.

  • 0: can enter digit, display as 0

  • 9: can enter digit, display as space

  • #: digit, plus or minus sign, display as space

  • +: sign. display ‘+’ for positive

  • -: sign. display ’ ’ for positive

  • . and ,: decimal and grouping separators

  • H: must enter a hex digit, display as 0

  • h: can enter a hex digit, display as space

  • O: must enter an octal digit, display as 0

  • o: can enter an octal digit, display as space

  • D: must enter a decimal digit, display as 0

  • d: can enter a decimal digit, display as space

  • l: can enter letter, display as space

  • a: can enter letter or digit, display as space

  • c: can enter character or space, display as space

  • _: anything, display as space

  • SPACE: separator character move the cursor when entered.

  • \: escapes the following character and uses it as a separator.

  • all other ascii characters a reserved.

Inspired by https://support.microsoft.com/en-gb/office/control-data-entry-formats-with-input-masks-e125997a-7791-49e5-8672-4a47832de8da

Source

pub fn mask(&self) -> String

Display mask.

Source

pub fn set_invalid(&mut self, invalid: bool)

Renders the widget in invalid style.

Source

pub fn get_invalid(&self) -> bool

Renders the widget in invalid style.

Source

pub fn set_overwrite(&mut self, overwrite: bool)

The next edit operation will overwrite the current content instead of adding text. Any move operations will cancel this overwrite.

Source

pub fn overwrite(&self) -> bool

Will the next edit operation overwrite the content?

Source§

impl MaskedInputState

Source

pub fn set_clipboard(&mut self, clip: Option<impl Clipboard + 'static>)

Clipboard used. Default is to use the global_clipboard().

Source

pub fn clipboard(&self) -> Option<&dyn Clipboard>

Clipboard used. Default is to use the global_clipboard().

Source

pub fn copy_to_clip(&mut self) -> bool

Copy to internal buffer

Source

pub fn cut_to_clip(&mut self) -> bool

Cut to internal buffer

Source

pub fn paste_from_clip(&mut self) -> bool

Paste from internal buffer.

Source§

impl MaskedInputState

Source

pub fn set_undo_buffer(&mut self, undo: Option<impl UndoBuffer + 'static>)

Set undo buffer.

Source

pub fn undo_buffer(&self) -> Option<&dyn UndoBuffer>

Undo

Source

pub fn undo_buffer_mut(&mut self) -> Option<&mut dyn UndoBuffer>

Undo

Source

pub fn recent_replay_log(&mut self) -> Vec<UndoEntry>

Get all recent replay recordings.

Source

pub fn replay_log(&mut self, replay: &[UndoEntry])

Apply the replay recording.

Source

pub fn begin_undo_seq(&mut self)

Begin a sequence of changes that should be undone in one go.

Source

pub fn end_undo_seq(&mut self)

End a sequence of changes that should be undone in one go.

Source

pub fn undo(&mut self) -> bool

Undo operation

Source

pub fn redo(&mut self) -> bool

Redo operation

Source§

impl MaskedInputState

Source

pub fn clear_styles(&mut self)

Clear all styles.

Source

pub fn set_styles(&mut self, styles: Vec<(Range<usize>, usize)>)

Set and replace all styles.

Source

pub fn add_style(&mut self, range: Range<usize>, style: usize)

Add a style for a byte-range. The style-nr refers to one of the styles set with the widget.

Source

pub fn add_range_style( &mut self, range: Range<u32>, style: usize, ) -> Result<(), TextError>

Add a style for a Range<upos_type> to denote the cells. The style-nr refers to one of the styles set with the widget.

Source

pub fn remove_style(&mut self, range: Range<usize>, style: usize)

Remove the exact byte-range and style.

Source

pub fn remove_range_style( &mut self, range: Range<u32>, style: usize, ) -> Result<(), TextError>

Remove the exact Range<upos_type> and style.

Source

pub fn styles_in( &self, range: Range<usize>, buf: &mut Vec<(Range<usize>, usize)>, )

Find all styles that touch the given range.

Source

pub fn styles_at(&self, byte_pos: usize, buf: &mut Vec<(Range<usize>, usize)>)

All styles active at the given position.

Source

pub fn styles_at_match( &self, byte_pos: usize, style: usize, ) -> Option<Range<usize>>

Check if the given style applies at the position and return the complete range for the style.

Source

pub fn styles(&self) -> Option<impl Iterator<Item = (Range<usize>, usize)>>

List of all styles.

Source§

impl MaskedInputState

Source

pub fn offset(&self) -> u32

Text-offset.

Source

pub fn set_offset(&mut self, offset: u32)

Set the text-offset.

Source

pub fn cursor(&self) -> u32

Cursor position.

Source

pub fn set_cursor(&mut self, cursor: u32, extend_selection: bool) -> bool

Set the cursor position. Scrolls the cursor to a visible position.

Source

pub fn section_cursor(&self, cursor: u32) -> Option<u32>

Get the default cursor for the section at the given cursor position, if it is an editable section.

Source

pub fn next_section_cursor(&self, cursor: u32) -> Option<u32>

Get the default cursor position for the next editable section.

Source

pub fn prev_section_cursor(&self, cursor: u32) -> Option<u32>

Get the default cursor position for the next editable section.

Source

pub fn is_section_boundary(&self, pos: u32) -> bool

Is the position at a word boundary?

Source

pub fn section_id(&self, cursor: u32) -> u16

Get the index of the section at the given cursor position.

Source

pub fn section_range(&self, cursor: u32) -> Option<Range<u32>>

Get the range for the section at the given cursor position, if it is an editable section.

Source

pub fn next_section_range(&self, cursor: u32) -> Option<Range<u32>>

Get the default cursor position for the next editable section.

Source

pub fn prev_section_range(&self, cursor: u32) -> Option<Range<u32>>

Get the default cursor position for the next editable section.

Source

pub fn set_default_cursor(&mut self)

Place cursor at the decimal separator, if any. 0 otherwise. Scrolls the cursor to a visible position.

Source

pub fn anchor(&self) -> u32

Selection anchor.

Source

pub fn has_selection(&self) -> bool

Selection.

Source

pub fn selection(&self) -> Range<u32>

Selection.

Source

pub fn set_selection(&mut self, anchor: u32, cursor: u32) -> bool

Selection. Scrolls the cursor to a visible position.

Source

pub fn select_all(&mut self) -> bool

Selection. Scrolls the cursor to a visible position.

Source

pub fn selected_text(&self) -> &str

Selection.

Source§

impl MaskedInputState

Source

pub fn is_empty(&self) -> bool

Empty

Source

pub fn text(&self) -> &str

Value with all punctuation and default values according to the mask type.

Source

pub fn value<T>(&self) -> Result<T, <T as FromStr>::Err>
where T: FromStr,

Parse value.

Source

pub fn section_value<T>(&self, section: u16) -> Result<T, <T as FromStr>::Err>
where T: FromStr,

Parse the value of one section.

Panic

Panics on out of bounds.

Source

pub fn set_section_value<T>(&mut self, section: u16, value: T)
where T: ToString,

Set the value of one section.

Panic

Panics on out of bounds.

Source

pub fn section_text(&self, section: u16) -> &str

Get one section.

Panic

Panics on out of bounds.

Source

pub fn set_section_text<S>(&mut self, section: u16, txt: S)
where S: Into<String>,

Set the text for a given section. The text-string is cut to size and filled with blanks if necessary.

Source

pub fn str_slice_byte(&self, range: Range<usize>) -> Cow<'_, str>

Text slice as Cow<str>. Uses a byte range.

Source

pub fn try_str_slice_byte( &self, range: Range<usize>, ) -> Result<Cow<'_, str>, TextError>

Text slice as Cow<str>. Uses a byte range.

Source

pub fn str_slice(&self, range: Range<u32>) -> Cow<'_, str>

Text slice as Cow<str>

Source

pub fn try_str_slice( &self, range: Range<u32>, ) -> Result<Cow<'_, str>, TextError>

Text slice as Cow<str>

Source

pub fn len(&self) -> u32

Length as grapheme count.

Source

pub fn len_bytes(&self) -> usize

Length in bytes.

Source

pub fn line_width(&self) -> u32

Length as grapheme count.

Source

pub fn grapheme_at(&self, pos: u32) -> Result<Option<Grapheme<'_>>, TextError>

Get the grapheme at the given position.

Source

pub fn text_graphemes( &self, pos: u32, ) -> <TextString as TextStore>::GraphemeIter<'_>

Get a cursor over all the text with the current position set at pos.

Source

pub fn try_text_graphemes( &self, pos: u32, ) -> Result<<TextString as TextStore>::GraphemeIter<'_>, TextError>

Get a cursor over all the text with the current position set at pos.

Source

pub fn graphemes( &self, range: Range<u32>, pos: u32, ) -> <TextString as TextStore>::GraphemeIter<'_>

Get a cursor over the text-range the current position set at pos.

Source

pub fn try_graphemes( &self, range: Range<u32>, pos: u32, ) -> Result<<TextString as TextStore>::GraphemeIter<'_>, TextError>

Get a cursor over the text-range the current position set at pos.

Source

pub fn byte_at(&self, pos: u32) -> Range<usize>

Grapheme position to byte position. This is the (start,end) position of the single grapheme after pos.

Source

pub fn try_byte_at(&self, pos: u32) -> Result<Range<usize>, TextError>

Grapheme position to byte position. This is the (start,end) position of the single grapheme after pos.

Source

pub fn bytes_at_range(&self, range: Range<u32>) -> Range<usize>

Grapheme range to byte range.

Source

pub fn try_bytes_at_range( &self, range: Range<u32>, ) -> Result<Range<usize>, TextError>

Grapheme range to byte range.

Source

pub fn byte_pos(&self, byte: usize) -> u32

Byte position to grapheme position. Returns the position that contains the given byte index.

Source

pub fn try_byte_pos(&self, byte: usize) -> Result<u32, TextError>

Byte position to grapheme position. Returns the position that contains the given byte index.

Source

pub fn byte_range(&self, bytes: Range<usize>) -> Range<u32>

Byte range to grapheme range.

Source

pub fn try_byte_range( &self, bytes: Range<usize>, ) -> Result<Range<u32>, TextError>

Byte range to grapheme range.

Source§

impl MaskedInputState

Source

pub fn clear(&mut self) -> bool

Reset to empty.

Source

pub fn set_value<S>(&mut self, s: S)
where S: ToString,

Set text.

Returns an error if the text contains line-breaks.

Source

pub fn set_text<S>(&mut self, s: S)
where S: Into<String>,

Set the value.

No checks if the value conforms to the mask. If the value is too short it will be filled with space. if the value is too long it will be truncated.

Source

pub fn insert_char(&mut self, c: char) -> bool

Insert a char at the current position.

Source

pub fn delete_range(&mut self, range: Range<u32>) -> bool

Remove the selected range. The text will be replaced with the default value as defined by the mask.

Source

pub fn try_delete_range(&mut self, range: Range<u32>) -> Result<bool, TextError>

Remove the selected range. The text will be replaced with the default value as defined by the mask.

Source§

impl MaskedInputState

Source

pub fn delete_next_char(&mut self) -> bool

Delete the char after the cursor.

Source

pub fn delete_prev_char(&mut self) -> bool

Delete the char before the cursor.

Source

pub fn delete_prev_section(&mut self) -> bool

Delete the previous section.

Source

pub fn delete_next_section(&mut self) -> bool

Delete the next section.

Source

pub fn move_right(&mut self, extend_selection: bool) -> bool

Move to the next char.

Source

pub fn move_left(&mut self, extend_selection: bool) -> bool

Move to the previous char.

Source

pub fn move_to_line_start(&mut self, extend_selection: bool) -> bool

Start of line

Source

pub fn move_to_line_end(&mut self, extend_selection: bool) -> bool

End of line

Source

pub fn move_to_prev_section(&mut self, extend_selection: bool) -> bool

Move to start of previous section.

Source

pub fn move_to_next_section(&mut self, extend_selection: bool) -> bool

Move to end of previous section.

Source

pub fn select_current_section(&mut self) -> bool

Select next section.

Source

pub fn select_next_section(&mut self) -> bool

Select next section.

Source

pub fn select_prev_section(&mut self) -> bool

Select previous section.

Source§

impl MaskedInputState

Source

pub fn screen_to_col(&self, scx: i16) -> u32

Converts from a widget relative screen coordinate to a grapheme index. x is the relative screen position.

Source

pub fn col_to_screen(&self, pos: u32) -> Option<u16>

Converts a grapheme based position to a screen position relative to the widget area.

Source

pub fn set_screen_cursor(&mut self, cursor: i16, extend_selection: bool) -> bool

Set the cursor position from a screen position relative to the origin of the widget. This value can be negative, which selects a currently not visible position and scrolls to it.

Source

pub fn set_screen_cursor_sections( &mut self, screen_cursor: i16, extend_selection: bool, ) -> bool

Set the cursor position from screen coordinates, rounds the position to the next section bounds.

The cursor positions are relative to the inner rect. They may be negative too, this allows setting the cursor to a position that is currently scrolled away.

Source

pub fn scroll_left(&mut self, delta: u32) -> bool

Scrolling

Source

pub fn scroll_right(&mut self, delta: u32) -> bool

Scrolling

Source

pub fn scroll_cursor_to_visible(&mut self)

Change the offset in a way that the cursor is visible.

Trait Implementations§

Source§

impl Clone for MaskedInputState

Source§

fn clone(&self) -> MaskedInputState

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for MaskedInputState

Source§

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

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

impl Default for MaskedInputState

Source§

fn default() -> MaskedInputState

Returns the “default value” for a type. Read more
Source§

impl HandleEvent<Event, MouseOnly, TextOutcome> for MaskedInputState

Source§

fn handle(&mut self, event: &Event, _keymap: MouseOnly) -> TextOutcome

Handle an event. Read more
Source§

impl HandleEvent<Event, ReadOnly, TextOutcome> for MaskedInputState

Source§

fn handle(&mut self, event: &Event, _keymap: ReadOnly) -> TextOutcome

Handle an event. Read more
Source§

impl HandleEvent<Event, Regular, TextOutcome> for MaskedInputState

Source§

fn handle(&mut self, event: &Event, _keymap: Regular) -> TextOutcome

Handle an event. Read more
Source§

impl HasFocus for MaskedInputState

Source§

fn build(&self, builder: &mut FocusBuilder)

Build the focus-structure for the container.
Source§

fn focus(&self) -> FocusFlag

Access to the flag for the rest.
Source§

fn area(&self) -> Rect

Area for mouse focus. Read more
Source§

fn navigable(&self) -> Navigation

Declares how the widget interacts with focus. Read more
Source§

fn id(&self) -> usize

Provide a unique id for the widget.
Source§

fn area_z(&self) -> u16

Z value for the area. Read more
Source§

fn is_focused(&self) -> bool

Focused?
Source§

fn lost_focus(&self) -> bool

Just lost focus.
Source§

fn gained_focus(&self) -> bool

Just gained focus.
Source§

impl HasScreenCursor for MaskedInputState

Source§

fn screen_cursor(&self) -> Option<(u16, u16)>

The current text cursor as an absolute screen position.

Source§

impl RelocatableState for MaskedInputState

Source§

fn relocate(&mut self, shift: (i16, i16), clip: Rect)

Relocate the areas in this widgets state. Read more
Source§

fn relocate_hidden(&mut self)

Relocate all areas to a clip-rect (0,0+0x0).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, D: AdaptFrom<S, Swp, Dwp, T>,

Source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<T>,

Convert the source color to the destination color using the specified method.
Source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default.
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, C> ArraysFrom<C> for T
where C: IntoArrays<T>,

Source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
Source§

impl<T, C> ArraysInto<C> for T
where C: FromArrays<T>,

Source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
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<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for U
where T: FromCam16Unclamped<WpParam, U>,

Source§

type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
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, C> ComponentsFrom<C> for T
where C: IntoComponents<T>,

Source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromAngle<T> for T

Source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
Source§

impl<T, U> FromStimulus<U> for T
where U: IntoStimulus<T>,

Source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, rounding and clamping.
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, U> IntoAngle<U> for T
where U: FromAngle<T>,

Source§

fn into_angle(self) -> U

Performs a conversion into T.
Source§

impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for U
where T: Cam16FromUnclamped<WpParam, U>,

Source§

type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T, U> IntoColor<U> for T
where U: FromColor<T>,

Source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
Source§

impl<T, U> IntoColorUnclamped<U> for T
where U: FromColorUnclamped<T>,

Source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
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> IntoStimulus<T> for T

Source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, rounding and clamping.
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, C> TryComponentsInto<C> for T
where C: TryFromComponents<T>,

Source§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
Source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of colors. 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.
Source§

impl<T, U> TryIntoColor<U> for T
where U: TryFromColor<T>,

Source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
Source§

impl<C, U> UintsFrom<C> for U
where C: IntoUints<U>,

Source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
Source§

impl<C, U> UintsInto<C> for U
where C: FromUints<U>,

Source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.