Skip to main content

Pixels

Struct Pixels 

Source
pub struct Pixels(/* private fields */);
Expand description

A length in logical pixels, GPUI’s unit for layout, painting and input.

The platform converts logical pixels to device pixels using the display’s scale factor. Thus px(10.) becomes 20 device pixels at scale factor 2. Styles, element bounds, Point and Size values in the UI use Pixels.

GPUI has three pixel types, and they differ in what the number counts:

  • Pixels is a logical length. Its value is an f32, so fractions are kept.
  • ScaledPixels is a logical length multiplied by the scale factor, from Pixels::scale. It is still an f32 and isn’t rounded. Paint primitives in the scene are in scaled pixels.
  • DevicePixels is a whole number of physical pixels on the display. Convert to it with Size::to_device_pixels or Bounds::to_device_pixels, which round each component to the nearest pixel.

Create a Pixels with px or Pixels::from. It supports addition and subtraction with other Pixels, multiplication and division by an f32, and division by another Pixels, which gives a plain f32 ratio.

§Examples

use gpui::{Pixels, ScaledPixels, px};

let length = Pixels::from(10.0);
let scaled_length = length.scale(2.0);
assert_eq!(scaled_length, ScaledPixels::from(20.0));
assert_eq!(px(10.) / px(4.), 2.5);

Implementations§

Source§

impl Pixels

Source

pub const ZERO: Pixels

A length of zero pixels.

Source

pub const MAX: Pixels

The largest finite value that Pixels can hold.

Source

pub const MIN: Pixels

The smallest finite value that Pixels can hold.

Source

pub fn as_f32(self) -> f32

Returns the raw f32 value.

Source

pub fn floor(&self) -> Self

Returns the largest whole number of pixels that is less than or equal to this value.

§Examples
assert_eq!(px(2.7).floor(), px(2.));
assert_eq!(px(-2.3).floor(), px(-3.));
Source

pub fn round(&self) -> Self

Returns this value rounded to the nearest whole pixel. Halfway values round away from zero.

§Examples
assert_eq!(px(2.4).round(), px(2.));
assert_eq!(px(2.5).round(), px(3.));
Source

pub fn ceil(&self) -> Self

Returns the smallest whole number of pixels that is greater than or equal to this value.

§Examples
assert_eq!(px(2.1).ceil(), px(3.));
assert_eq!(px(-2.7).ceil(), px(-2.));
Source

pub fn scale(&self, factor: f32) -> ScaledPixels

Multiplies this value by factor, producing ScaledPixels.

Pass the display’s scale factor, such as 2.0 on a Retina display. The result isn’t rounded.

§Examples
assert_eq!(px(10.).scale(1.5), ScaledPixels::from(15.));
Source

pub fn pow(&self, exponent: f32) -> Self

Raises this value to the power exponent.

§Examples
assert_eq!(px(3.).pow(2.), px(9.));
Source

pub fn abs(&self) -> Self

Returns the absolute value.

§Examples
assert_eq!(px(-3.).abs(), px(3.));
Source

pub fn signum(&self) -> f32

Returns 1.0 for positive values and +0.0, and -1.0 for negative values and -0.0.

The sign is a plain f32, not Pixels.

§Examples
assert_eq!(px(-3.).signum(), -1.0);
assert_eq!(px(3.).signum(), 1.0);
Source

pub fn to_f64(self) -> f64

Returns the value as an f64.

§Examples
assert_eq!(px(1.5).to_f64(), 1.5);

Trait Implementations§

Source§

impl Add for Pixels

Source§

type Output = Pixels

The resulting type after applying the + operator.
Source§

fn add(self, __rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign for Pixels

Source§

fn add_assign(&mut self, __rhs: Self)

Performs the += operation. Read more
Source§

impl Clone for Pixels

Source§

fn clone(&self) -> Self

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 Pixels

Source§

impl Debug for Pixels

Source§

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

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

impl Default for Pixels

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Pixels

Source§

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 Display for Pixels

Source§

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

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

impl Div for Pixels

Source§

type Output = f32

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl<__derive_more_Rhs> Div<__derive_more_Rhs> for Pixels
where f32: Div<__derive_more_Rhs, Output = f32>,

Source§

type Output = Pixels

The resulting type after applying the / operator.
Source§

fn div(self, __rhs: __derive_more_Rhs) -> Self::Output

Performs the / operation. Read more
Source§

impl DivAssign for Pixels

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl<__derive_more_Rhs> DivAssign<__derive_more_Rhs> for Pixels
where f32: DivAssign<__derive_more_Rhs>,

Source§

fn div_assign(&mut self, __rhs: __derive_more_Rhs)

Performs the /= operation. Read more
Source§

impl Eq for Pixels

Source§

impl From<&Pixels> for f32

Source§

fn from(pixels: &Pixels) -> Self

Converts to this type from the input type.
Source§

impl From<&Pixels> for u32

Source§

fn from(pixels: &Pixels) -> Self

Converts to this type from the input type.
Source§

impl From<Pixels> for Edges<Pixels>

Source§

fn from(val: Pixels) -> Self

Converts to this type from the input type.
Source§

impl From<Pixels> for Corners<Pixels>

Source§

fn from(val: Pixels) -> Self

Converts to this type from the input type.
Source§

impl From<Pixels> for f32

Source§

fn from(pixels: Pixels) -> Self

Converts to this type from the input type.
Source§

impl From<Pixels> for f64

Source§

fn from(pixels: Pixels) -> Self

Converts to this type from the input type.
Source§

impl From<Pixels> for u32

Source§

fn from(pixels: Pixels) -> Self

Converts to this type from the input type.
Source§

impl From<Pixels> for usize

Source§

fn from(pixels: Pixels) -> Self

Converts to this type from the input type.
Source§

impl From<Pixels> for AbsoluteLength

Source§

fn from(pixels: Pixels) -> Self

Converts to this type from the input type.
Source§

impl From<Pixels> for DefiniteLength

Source§

fn from(pixels: Pixels) -> Self

Converts to this type from the input type.
Source§

impl From<Pixels> for Length

Source§

fn from(pixels: Pixels) -> Self

Converts to this type from the input type.
Source§

impl From<Pixels> for AvailableSpace

Source§

fn from(pixels: Pixels) -> Self

Converts to this type from the input type.
Source§

impl From<f32> for Pixels

Source§

fn from(pixels: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for Pixels

Source§

fn from(pixels: f64) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for Pixels

Source§

fn from(pixels: u32) -> Self

Converts to this type from the input type.
Source§

impl From<usize> for Pixels

Source§

fn from(pixels: usize) -> Self

Converts to this type from the input type.
Source§

impl Half for Pixels

Source§

fn half(&self) -> Self

Returns half of this value.
Source§

impl Hash for Pixels

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Interpolate for Pixels

Source§

fn interpolate(from: Self, to: Self, phase: f32) -> Self

Returns the value at phase, where 0.0 is from and 1.0 is to. Read more
Source§

impl IsZero for Pixels

Source§

fn is_zero(&self) -> bool

Returns true if this value is zero.
Source§

impl JsonSchema for Pixels

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl Lerp for Pixels

Source§

fn lerp(&self, to: &Self, delta: f32) -> Self

Returns the value delta of the way from self to to.
Source§

impl Mul<Pixels> for f32

Source§

type Output = Pixels

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Pixels) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Pixels> for usize

Source§

type Output = Pixels

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Pixels) -> Pixels

Performs the * operation. Read more
Source§

impl Mul<Pixels> for Rems

Source§

type Output = Pixels

The resulting type after applying the * operator.
Source§

fn mul(self, other: Pixels) -> Pixels

Performs the * operation. Read more
Source§

impl Mul<f32> for Pixels

Source§

type Output = Pixels

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f32) -> Self

Performs the * operation. Read more
Source§

impl Mul<usize> for Pixels

Source§

type Output = Pixels

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: usize) -> Self

Performs the * operation. Read more
Source§

impl MulAssign<f32> for Pixels

Source§

fn mul_assign(&mut self, rhs: f32)

Performs the *= operation. Read more
Source§

impl Neg for Pixels

Source§

type Output = Pixels

The resulting type after applying the - operator.
Source§

fn neg(self) -> Pixels

Performs the unary - operation. Read more
Source§

impl Ord for Pixels

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq for Pixels

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl PartialOrd for Pixels

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Rem for Pixels

Source§

type Output = Pixels

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self

Performs the % operation. Read more
Source§

impl RemAssign for Pixels

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

impl Serialize for Pixels

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl SpringTarget for Pixels

Source§

type Output = Pixels

The value that the spring animator receives.
Source§

fn target(&self) -> f32

Returns this target as a coordinate for the spring.
Source§

fn resolve(&self, value: f32) -> Self::Output

Converts a spring coordinate into the output the animator receives.
Source§

impl StructuralPartialEq for Pixels

Source§

impl Sub for Pixels

Source§

type Output = Pixels

The resulting type after applying the - operator.
Source§

fn sub(self, __rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign for Pixels

Source§

fn sub_assign(&mut self, __rhs: Self)

Performs the -= operation. Read more
Source§

impl Sum for Pixels

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<'a> Sum<&'a Pixels> for Pixels

Source§

fn sum<I: Iterator<Item = &'a Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl TryFrom<&str> for Pixels

Source§

type Error = Error

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

fn try_from(value: &str) -> Result<Self, Self::Error>

Performs the conversion.

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>,

👎Deprecated since 0.7.7:

replaced by palette::chromatic_adaptation::AdaptIntoUnclamped

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

fn adapt_into(self) -> D

👎Deprecated since 0.7.7:

replaced by palette::chromatic_adaptation::AdaptIntoUnclamped

Convert the source color to the destination color using the bradford method by default.
Source§

impl<T, C> AdaptIntoUnclamped<T> for C
where T: AdaptFromUnclamped<C>,

Source§

type Scalar = <T as AdaptFromUnclamped<C>>::Scalar

The number type that’s used as the color’s components.
Source§

fn adapt_into_unclamped_with<M>(self) -> T

Adapt a color of type Self into a color of type T, using the custom matrix M. Read more
Source§

fn adapt_into_unclamped(self) -> T
where Bradford: LmsToXyz<Self::Scalar> + XyzToLms<Self::Scalar>,

Adapt a color of type Self into a color of type T, using the Bradford matrix. Read more
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
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, C> ComponentsInto<C> for T

Source§

fn components_into(self) -> C

Cast this collection of color components into a collection of colors. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

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

Source§

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

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<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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<K> MapSeekTarget<K> for K
where K: Ord,

Source§

fn cmp_cursor(&self, cursor_location: &K) -> Ordering

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

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> ToSmolStr for T
where T: Display + ?Sized,

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, 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more