-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
345: Add `ArraysAs`, `AsArrays`, and corresponding traits for components and uints r=Ogeon a=Ogeon This adds more casting traits, in addition to #338. These traits fulfill the same purpose as `AsRef` and `AsMut`, such as: ```rust use palette::{Srgb, cast::ComponentsAsMut}; let mut image_buffer: Vec<u8> = /* ... */; let color_buffer: &mut [Srgb<u8>] = image_buffer.components_as_mut(); ``` Co-authored-by: Erik Hedvall <[email protected]>
- Loading branch information
Showing
14 changed files
with
1,419 additions
and
497 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.