Struct ril::L

source · []
pub struct L(pub u8);
Expand description

Represents an L, or luminance pixel that is stored as only one single number representing how bright, or intense, the pixel is.

This can be thought of as the “unit channel” as this represents only a single channel in which other pixel types can be composed of.

Tuple Fields

0: u8

The luminance value of the pixel, between 0 and 255.

Implementations

Creates a new L pixel with the given luminance value.

Returns the luminance value of the pixel.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Returns the inverted value of this pixel. Read more

Creates this pixel from raw data. Read more

Creates raw pixel data from this pixel type.

Turns this pixel into bytes.

Merges this pixel with the given overlay pixel, where the alpha of the overlay pixel is known. This is used in anti-aliasing. Read more

Creates this pixel from any dynamic pixel…dynamically at runtime. Different from the From/Into traits. Read more

The luminance of the pixel.

Merges this pixel with the given overlay pixel, taking into account alpha.

Overlays this pixel with the given overlay pixel, abiding by the given overlay mode.

Overlays this pixel with the given overlay pixel, abiding by the given overlay mode with the given alpha. 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 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.