Struct image2::PixelVec

source ·
pub struct PixelVec<T: Type>(_);
Expand description

PixelVec is a 4-channel pixel backed by a static array

Implementations§

Create a new PixelVec, each channel set to 0

Create a new PixelVec with the given values

Create a new PixelBec with every channel set to the given value. The alpha channel is set to T::max()

Create a new PixelVec from an existing Pixel

Create a new PixelVec by mapping f over an existing PixelVec

Convert from PixelVec<T> to Vec<T>

Convert from PixelVec<T> to Vec<f64> and normalize values

Convert from PixelVec<T> to PixelVec<f64> and normalize values

Trait Implementations§

The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Create a new Vec from existing pixel data
Create a new Vec of normalized values from existing pixel data
Create a new PixelVec from existing pixel data
Create a new PixelVec of normalized values from existing pixel data
Returns true when every value is > 0
Returns true when every value == 0
Create a new PixelVec by executing f for each channel
Copy values from a normalized f64 pixel
Copy values from another pixel
The resulting type after applying the % operator.
Performs the % operation. Read more
The resulting type after applying the % operator.
Performs the % operation. Read more
Performs the %= operation. Read more
Performs the %= operation. Read more
Serialize this value into the given Serde serializer. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.