### Implement Default for ParsingOptions Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.ParsingOptions.html Provides a default value for ParsingOptions. This is useful for initializing the struct when no specific options are provided, ensuring a sensible starting configuration. ```rust fn default() -> Self ``` -------------------------------- ### Hypercube Initialization Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Hypercube.html Methods to initialize a new Hypercube instance. ```APIDOC ## new ### Description Creates a new Hypercube instance from a flat array and grid size. ### Parameters - **array** (&[f32]) - Required - The input data array. - **grid_size** (usize) - Required - The size of the grid. - **channels** (usize) - Required - The number of channels. ## new_hypercube ### Description Creates a new Hypercube instance with a specific 4D grid size. ### Parameters - **array** (&[f32]) - Required - The input data array. - **grid_size** ([u8; 4]) - Required - The 4D grid dimensions. - **channels** (usize) - Required - The number of channels. ``` -------------------------------- ### Get Colorant Matrix Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.ColorProfile.html Retrieves the colorant matrix from a ColorProfile instance. This is part of the ColorProfile implementation. ```rust pub fn colorant_matrix(&self) -> Matrix3d ``` -------------------------------- ### Get ColorProfile Version Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.ColorProfile.html Retrieves the profile version from a ColorProfile instance. This method is part of the ColorProfile implementation. ```rust pub fn version(&self) -> ProfileVersion ``` -------------------------------- ### TryFrom for ProfileSignature Implementation Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.ProfileSignature.html Enables conversion from u32 to ProfileSignature with error handling. ```APIDOC ### impl TryFrom for ProfileSignature #### type Error = CmsError The type returned in the event of a conversion error. #### fn try_from(value: u32) -> Result Performs the conversion. ``` -------------------------------- ### fn try_into Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.LutType.html Documentation for the try_into conversion method. ```APIDOC ## fn try_into(self) -> Result>::Error> ### Description Performs the conversion from the current type to the target type U. ### Parameters - **self** (T) - Required - The instance to be converted. ### Response - **Result>::Error>** - Returns the converted type U or an error if the conversion fails. ``` -------------------------------- ### Implement Any for T Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.LutWarehouse.html Provides runtime type information for any type T that is 'static and not ?Sized. Use `type_id` to get the unique identifier of a type. ```rust fn type_id(&self) -> TypeId ``` -------------------------------- ### Oklab Constructor Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Oklab.html Creates a new Oklab color from l, a, and b values. ```rust pub const fn new(l: f32, a: f32, b: f32) -> Oklab ``` -------------------------------- ### Convert Chromaticity to Scaled Xyzd Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Chromaticity.html Gets the color representation with component sum 1. This method is well-defined even for colors with zero luminance and preserves that information. ```rust pub const fn to_scaled_xyzd(&self) -> Xyzd ``` -------------------------------- ### Create Cube with Grid Size Array Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Cube.html Constructs a new Cube using a 3-element array for grid size. Requires channel count. Returns a Result. ```rust pub fn new_cube( array: &[f32], grid_size: [u8; 3], channels: usize, ) -> Result, CmsError> ``` -------------------------------- ### Convert Chromaticity to Scaled XYZ Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Chromaticity.html Gets the color representation with component sum 1. This method is well-defined even for colors with zero luminance and preserves that information. ```rust pub const fn to_scaled_xyz(&self) -> Xyz ``` -------------------------------- ### Implement CloneToUninit (Nightly) Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.ProfileSignature.html A nightly-only experimental API for cloning data into uninitialized memory. Requires the Clone trait. ```rust impl CloneToUninit for T where T: Clone, { 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 } } ``` -------------------------------- ### Create Jzazbz from CIE Xyz with display luminance Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Jzazbz.html Creates a new Jzazbz from CIE Xyz, considering the display luminance. JzAzBz is defined in D65 white point, so XYZ may need adaptation. ```rust pub fn from_xyz_with_display_luminance( xyz: Xyz, display_luminance: f32, ) -> Jzazbz ``` -------------------------------- ### Cube Constructors Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Cube.html Functions for creating new Cube instances. ```APIDOC ## impl Cube<'_> ### pub fn new( array: &[f32], grid_size: usize, channels: usize, ) -> Result, CmsError> Creates a new Cube from a flat array, grid size, and number of channels. ### pub fn new_cube( array: &[f32], grid_size: [u8; 3], channels: usize, ) -> Result, CmsError> Creates a new Cube with a 3D grid size specification. ``` -------------------------------- ### Generic CloneToUninit Implementation (Experimental) Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.Layout.html An experimental nightly-only API that allows cloning a value into an uninitialized memory location. Requires the `clone_to_uninit` feature. ```rust impl CloneToUninit for T where T: Clone, ``` ```rust unsafe fn clone_to_uninit(&self, dest: *mut u8) ``` -------------------------------- ### LCh Constructor and Conversion Methods Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.LCh.html Provides methods for creating new LCh instances and converting between different color spaces. ```APIDOC ## impl LCh ### Methods - **new(l: f32, c: f32, h: f32)** -> Self: Creates a new LCh instance. - **from_luv(luv: Luv)** -> Self: Converts Lab to LCh(uv). - **from_lab(lab: Lab)** -> Self: Converts Lab to LCh(ab). - **from_xyz(xyz: Xyz)** -> Self: Computes LCh(uv). - **from_xyz_lab(xyz: Xyz)** -> Self: Computes LCh(ab). - **to_xyz()** -> Xyz: Converts LCh(uv) to Luv. - **to_xyz_lab()** -> Xyz: Converts LCh(ab) to Lab. - **to_luv()** -> Luv: Converts LCh to Luv. - **to_lab()** -> Lab: Converts LCh to Lab. ``` -------------------------------- ### Xyz Implementations Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Xyz.html Provides methods for Xyz struct, including conversions and creation. ```APIDOC ### impl Xyz #### pub fn to_xyy(&self) -> [f32; 3] Converts the XYZ struct to an [f32; 3] array representing XYY. #### pub fn from_xyy(xyy: [f32; 3]) -> Xyz Creates an XYZ struct from an [f32; 3] array representing XYY. #### pub fn to_xyzd(self) -> Xyzd Converts the XYZ struct to an Xyzd struct. #### pub const fn new(x: f32, y: f32, z: f32) -> Self Creates a new Xyz instance with the given x, y, and z values. #### pub const fn to_vector(self) -> Vector3f Converts the Xyz struct to a Vector3f. #### pub const fn to_vector_d(self) -> Vector3d Converts the Xyz struct to a Vector3d. #### pub fn matrix_mul(&self, matrix: Matrix3f) -> Self Multiplies the Xyz struct by a Matrix3f. #### pub fn from_linear_rgb(rgb: Rgb, rgb_to_xyz: Matrix3f) -> Self Creates an Xyz struct from linear RGB values and a conversion matrix. #### pub fn normalize(self) -> Self Normalizes the Xyz struct. #### pub fn to_linear_rgb(self, rgb_to_xyz: Matrix3f) -> Rgb Converts the Xyz struct to linear RGB values using a conversion matrix. ``` -------------------------------- ### LutStore Implementations Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.LutStore.html Details on the implementations for the LutStore enum, including traits like Clone, Debug, and PartialEq. ```APIDOC ## Trait Implementations for LutStore ### `Clone` Allows creating a duplicate of a `LutStore` instance. * `clone(&self) -> LutStore`: Returns a duplicate of the value. * `clone_from(&mut self, source: &Self)`: Performs copy-assignment from `source`. ### `Debug` Enables formatting a `LutStore` instance for debugging purposes. * `fmt(&self, f: &mut Formatter<'_>) -> Result`: Formats the value using the given formatter. ### `PartialEq` Allows comparing two `LutStore` instances for equality. * `eq(&self, other: &LutStore) -> bool`: Tests for `self` and `other` values to be equal. * `ne(&self, other: &Rhs) -> bool`: Tests for `!=`. ### `StructuralPartialEq` ### Auto Trait Implementations * `Freeze` * `RefUnwindSafe` * `Send` * `Sync` * `Unpin` * `UnsafeUnpin` * `UnwindSafe` ### Blanket Implementations These are generic implementations that apply to `LutStore` due to its generic bounds. * `Any` * `Borrow` * `BorrowMut` * `CloneToUninit` (Nightly-only experimental API) * `From` * `Into` * `ToOwned` * `TryFrom` * `TryInto` ``` -------------------------------- ### Create Standard ColorProfiles Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.ColorProfile.html Provides factory methods for creating common standard color profiles like sRGB, Adobe RGB, Display P3, DCI P3, ProPhoto RGB, and BT.2020 variants. Also includes methods for monochrome and ACES profiles. ```rust pub fn new_srgb() -> ColorProfile ``` ```rust pub fn new_adobe_rgb() -> ColorProfile ``` ```rust pub fn new_display_p3() -> ColorProfile ``` ```rust pub fn new_display_p3_pq() -> ColorProfile ``` ```rust pub fn new_dci_p3() -> ColorProfile ``` ```rust pub fn new_pro_photo_rgb() -> ColorProfile ``` ```rust pub fn new_bt2020() -> ColorProfile ``` ```rust pub fn new_bt2020_pq() -> ColorProfile ``` ```rust pub fn new_bt2020_hlg() -> ColorProfile ``` ```rust pub fn new_gray_with_gamma(gamma: f32) -> ColorProfile ``` ```rust pub fn new_aces_aces_2065_1_linear() -> ColorProfile ``` ```rust pub fn new_aces_cg_linear() -> ColorProfile ``` ```rust pub fn new_lab() -> ColorProfile ``` -------------------------------- ### Rgb Indexing Implementations Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Rgb.html Details the `Index` and `IndexMut` trait implementations for `Rgb`. ```APIDOC ## Index for Rgb ### Description Provides indexing capabilities for `Rgb` using `usize`. ### Type Alias `Output = T` ### Method `index(&self, index: usize) -> &T` Performs the indexing (`container[index]`) operation. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` ```APIDOC ## IndexMut for Rgb ### Description Provides mutable indexing capabilities for `Rgb` using `usize`. ### Method `index_mut(&mut self, index: usize) -> &mut T` Performs the mutable indexing (`container[index]`) operation. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### Implement PartialEq for ParsingOptions Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.ParsingOptions.html Enables comparison of two ParsingOptions instances for equality. This allows checking if two sets of parsing options are identical. ```rust fn eq(&self, other: &ParsingOptions) -> bool ``` -------------------------------- ### Create Hypercube with Grid Size Array (u8) Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Hypercube.html Constructs a new Hypercube instance using a slice of f32 values, a 4-element array for grid size, and the number of channels. Returns a Result containing either the Hypercube or a CmsError. ```rust pub fn new_hypercube( array: &[f32], grid_size: [u8; 4], channels: usize, ) -> Result, CmsError> ``` -------------------------------- ### adapt_to_illuminant Function Signature Source: https://docs.rs/moxcms/0.8.1/moxcms/fn.adapt_to_illuminant.html This is the function signature for adapt_to_illuminant. It takes a Matrix3f, a source white point (XyY), and an illuminant XYZ value, returning a Matrix3f. ```rust pub const fn adapt_to_illuminant( r: Matrix3f, source_white_pt: XyY, illuminant_xyz: Xyz, ) -> Matrix3f ``` -------------------------------- ### Implement PartialEq for ProfileVersion Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.ProfileVersion.html Allows checking for equality between ProfileVersion variants. This is fundamental for comparing versions. ```rust impl PartialEq for ProfileVersion { fn eq(&self, other: &ProfileVersion) -> bool { // Implementation details omitted for brevity } fn ne(&self, other: &Rhs) -> bool { // Implementation details omitted for brevity } } ``` -------------------------------- ### Yrg Constructor and Conversions Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Yrg.html Provides methods for creating a new Yrg instance and converting between Yrg and Xyz colorspaces. ```APIDOC ## Implementations for Yrg ### impl Yrg #### pub const fn new(y: f32, r: f32, g: f32) -> Yrg Creates a new Yrg color. #### pub fn from_xyz(xyz: Xyz) -> Self Convert Xyz D65 to Yrg. Yrg defined in D65 white point. Ensure Xyz values is adapted. Yrg use CIE XYZ 2006, adapt CIE XYZ 1931 by using cie_y_1931_to_cie_y_2006 at first. #### pub fn to_xyz(&self) -> Xyz Converts the Yrg color to an Xyz color. ``` -------------------------------- ### Implement Clone for CicpProfile Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.CicpProfile.html Provides implementations for cloning CicpProfile instances. Includes `clone` for creating a duplicate and `clone_from` for copy-assignment. ```rust fn clone(&self) -> CicpProfile ``` ```rust fn clone_from(&mut self, source: &Self) ``` -------------------------------- ### StructuralPartialEq Implementation for MatrixCoefficients Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.MatrixCoefficients.html Provides structural equality comparison for MatrixCoefficients. ```APIDOC ## Trait Implementation: StructuralPartialEq for MatrixCoefficients This trait allows for structural equality checks on MatrixCoefficients. ``` -------------------------------- ### Function: adapt_to_illuminant_xyz_d Source: https://docs.rs/moxcms/0.8.1/moxcms/fn.adapt_to_illuminant_xyz_d.html Documentation for the adapt_to_illuminant_xyz_d function used for color adaptation. ```APIDOC ## adapt_to_illuminant_xyz_d ### Description Performs a color adaptation transformation on a 3x3 matrix based on source and target white points. ### Signature `pub const fn adapt_to_illuminant_xyz_d(r: Matrix3d, source_white_pt: Xyz, illuminant_xyz: Xyz) -> Matrix3d` ### Parameters - **r** (Matrix3d) - The input 3x3 matrix. - **source_white_pt** (Xyz) - The source white point coordinates. - **illuminant_xyz** (Xyz) - The target illuminant XYZ coordinates. ### Returns - **Matrix3d** - The adapted 3x3 matrix. ``` -------------------------------- ### Create New XyY Instance Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.XyY.html Constructor for creating a new XyY instance. Initializes the struct with provided x, y, and yb values. ```rust pub const fn new(x: f64, y: f64, yb: f64) -> Self ``` -------------------------------- ### Constants in moxcms Source: https://docs.rs/moxcms This section lists the constants provided by the moxcms crate, including predefined matrices and LUT tables. ```APIDOC ## Constants ### BT2020_MATRIX Predefined matrix for BT.2020 color primaries. ### DISPLAY_P3_MATRIX Predefined matrix for Display P3 color primaries. ### HLG_LUT_TABLE Hybrid Log Gamma Lookup table. ### PQ_LUT_TABLE Perceptual Quantizer Lookup table. ### SRGB_MATRIX Predefined matrix for sRGB color primaries. ### WHITE_POINT_D50 Defines the D50 white point. ### WHITE_POINT_D60 Defines the D60 white point. ### WHITE_POINT_D65 Defines the D65 white point. ### WHITE_POINT_DCI_P3 Defines the DCI-P3 white point. ``` -------------------------------- ### Implement TryFrom for ProfileSignature Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.ProfileSignature.html Enables safe conversion from a u32 integer to ProfileSignature. This handles potential errors if the u32 value does not correspond to a valid variant. ```rust impl TryFrom for ProfileSignature { type Error = CmsError; fn try_from(value: u32) -> Result { Performs the conversion. } } ``` -------------------------------- ### Lab Constructor Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Lab.html Provides a way to create a new Lab struct instance. ```APIDOC ## impl Lab ### pub const fn new(l: f32, a: f32, b: f32) -> Self Create a new CIELAB color. ### Arguments - **l** (f32) - lightness component (0 to 100). - **a** (f32) - green (negative) and red (positive) component. - **b** (f32) - blue (negative) and yellow (positive) component. ``` -------------------------------- ### clone_to_uninit Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.ColorPrimaries.html Nightly-only experimental API for performing copy-assignment. ```APIDOC ## unsafe fn clone_to_uninit(&self, dest: *mut u8) ### Description This is a nightly-only experimental API. Performs copy-assignment from `self` to `dest`. ### Method unsafe fn ### Endpoint N/A (Method implementation) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response None ``` -------------------------------- ### Create Hypercube with Grid Size Array Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Hypercube.html Constructs a new Hypercube instance using a slice of f32 values, a grid size, and the number of channels. Returns a Result containing either the Hypercube or a CmsError. ```rust pub fn new( array: &[f32], grid_size: usize, channels: usize, ) -> Result, CmsError> ``` -------------------------------- ### Implement StructuralPartialEq for Matrix3 Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Matrix3.html Enables structural comparison for Matrix3, useful in certain generic contexts. Requires T to implement StructuralPartialEq. ```rust impl StructuralPartialEq for Matrix3 ``` -------------------------------- ### From for u32 Implementation Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.ProfileSignature.html Enables conversion from ProfileSignature to u32. ```APIDOC ### impl From for u32 #### fn from(value: ProfileSignature) -> Self Converts to this type from the input type. ``` -------------------------------- ### ColorProfile Constructors Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.ColorProfile.html Methods for creating new ColorProfile instances for various standard color spaces. ```APIDOC ## impl ColorProfile ### `new_from_cicp` Creates new profile from CICP. #### Parameters - **cicp_color_primaries** (CicpProfile) - The CICP color primaries to use. ### `new_srgb` Creates new sRGB profile. ### `new_adobe_rgb` Creates new Adobe RGB profile. ### `new_display_p3` Creates new Display P3 profile. ### `new_display_p3_pq` Creates new Display P3 PQ profile. ### `new_dci_p3` Creates new DCI P3 profile. ### `new_pro_photo_rgb` Creates new ProPhoto RGB profile. ### `new_bt2020` Creates new Bt.2020 profile. ### `new_bt2020_pq` Creates new Bt.2020 PQ profile. ### `new_bt2020_hlg` Creates new Bt.2020 HLG profile. ### `new_gray_with_gamma` Creates new Monochrome profile. #### Parameters - **gamma** (f32) - The gamma value for the monochrome profile. ### `new_aces_aces_2065_1_linear` Creates new ACES 2065-1/AP0 profile. ### `new_aces_cg_linear` Creates new ACEScg profile. ### `new_lab` Creates new Generic CIE LAB profile. ``` -------------------------------- ### Functions in moxcms-0.8.1 Source: https://docs.rs/moxcms/0.8.1/moxcms/all.html Overview of the functions available in the moxcms-0.8.1 library. ```APIDOC ## Functions This section lists and describes the various functions available in the moxcms-0.8.1 library. ### adapt_to_d50 Adapts color values to the D50 illuminant. ### adapt_to_d50_d Adapts color values to the D50 illuminant with double precision. ### adapt_to_illuminant Adapts color values to a specified illuminant. ### adapt_to_illuminant_d Adapts color values to a specified illuminant with double precision. ### adapt_to_illuminant_xyz Adapts color values to a specified illuminant using XYZ coordinates. ### adapt_to_illuminant_xyz_d Adapts color values to a specified illuminant using XYZ coordinates with double precision. ### adaption_matrix Calculates the adaptation matrix between illuminants. ### adaption_matrix_d Calculates the adaptation matrix between illuminants with double precision. ### cie_y_1931_to_cie_y_2006 Converts CIE Y from 1931 to 2006 standard. ### curve_from_gamma Creates a tone curve from a gamma value. ### filmlike_clip Applies a film-like clipping to color values. ### rounding_div_ceil Performs a ceiling division with rounding. ``` -------------------------------- ### Blanket Implementations for ProfileVersion Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.ProfileVersion.html Details on blanket implementations applicable to ProfileVersion. ```APIDOC ### Blanket Implementations #### `impl Any for T` where T: 'static + ?Sized - `fn type_id(&self) -> TypeId`: Gets the `TypeId` of `self`. #### `impl Borrow for T` where T: ?Sized - `fn borrow(&self) -> &T`: Immutably borrows from an owned value. #### `impl BorrowMut for T` where T: ?Sized - `fn borrow_mut(&mut self) -> &mut T`: Mutably borrows from an owned value. #### `impl CloneToUninit for T` where T: Clone - `unsafe fn clone_to_uninit(&self, dest: *mut u8)`: Performs copy-assignment from `self` to `dest`. #### `impl From for T` - `fn from(t: T) -> T`: Returns the argument unchanged. #### `impl Into for T` where U: From - `fn into(self) -> U`: Calls `U::from(self)`. #### `impl ToOwned for T` where T: Clone ``` -------------------------------- ### Implement Clone for LutWarehouse Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.LutWarehouse.html Provides methods to clone LutWarehouse values. The `clone` method creates a duplicate, while `clone_from` performs copy-assignment. ```rust fn clone(&self) -> LutWarehouse ``` ```rust fn clone_from(&mut self, source: &Self) ``` -------------------------------- ### XyY Implementations Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.XyY.html Details on the implementations for the XyY struct. ```APIDOC ### impl Clone for XyY #### `fn clone(&self) -> XyY` Returns a duplicate of the value. #### `fn clone_from(&mut self, source: &Self)` Performs copy-assignment from `source`. ### impl Debug for XyY #### `fn fmt(&self, f: &mut Formatter<'_>) -> Result` Formats the value using the given formatter. ### impl Default for XyY #### `fn default() -> XyY` Returns the “default value” for a type. ### impl XyYRepresentable for XyY #### `fn to_xyy(self) -> XyY` Converts to XyY representation. ``` -------------------------------- ### Structs in moxcms-0.8.1 Source: https://docs.rs/moxcms/0.8.1/moxcms/all.html Overview of the data structures available in the moxcms-0.8.1 library. ```APIDOC ## Structs This section lists and describes the various structs available in the moxcms-0.8.1 library. ### Chromaticity Represents chromaticity coordinates. ### CicpProfile Represents a CICP (Content Light and Picture Processing) profile. ### ColorDateTime Represents a date and time associated with color information. ### ColorPrimaries Defines the primary colors of a color space. ### ColorProfile Represents a color profile. ### Cube A data structure, likely for color lookup tables. ### DescriptionString A localizable string for descriptions. ### DtUchHcb Represents a color in the Hcb color space. ### DtUchHsb Represents a color in the Hsb color space. ### DtUchJch Represents a color in the Jch color space. ### Hypercube A multi-dimensional data structure, likely for color lookup tables. ### ICtCp Represents a color in the ICtCp color space. ### Jzazbz Represents a color in the Jzazbz color space. ### Jzczhz Represents a color in the Jzczhz color space. ### LCh Represents a color in the LCh color space. ### Lab Represents a color in the Lab color space. ### LocalizableString A string that can be localized. ### LutDataType Defines the data type for LUTs (Look-Up Tables). ### LutMultidimensionalType Defines the data type for multi-dimensional LUTs. ### Luv Represents a color in the Luv color space. ### MalformedSize An error indicating a malformed size. ### Matrix3 A 3x3 matrix. ### Matrix3d A 3x3 double-precision floating-point matrix. ### Matrix3f A 3x3 single-precision floating-point matrix. ### Matrix4f A 4x4 single-precision floating-point matrix. ### Measurement Represents a color measurement. ### Oklab Represents a color in the Oklab color space. ### Oklch Represents a color in the Oklch color space. ### ParametricCurve Represents a parametric curve. ### ParsingOptions Options for parsing color data. ### Rgb Represents a color in the RGB color space. ### Srlab2 Represents a color in the Srlab2 color space. ### TransformOptions Options for color transformations. ### Vector3 A 3-dimensional vector. ### Vector4 A 4-dimensional vector. ### ViewingConditions Describes viewing conditions for color. ### XyY Represents a color in the XyY color space. ### Xyz Represents a color in the XYZ color space. ### Xyzd Represents a color in the Xyzd color space. ### Ych Represents a color in the Ych color space. ### Yrg Represents a color in the Yrg color space. ``` -------------------------------- ### to_owned and clone_into Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Vector3.html These methods are used for creating owned data from borrowed data, typically through cloning. ```APIDOC ## fn to_owned(&self) -> T ### Description Creates owned data from borrowed data, usually by cloning. ### Method Implicit (called on a borrowed reference) ### Endpoint N/A (Method on a type) ### Parameters None ### Request Example N/A ### Response #### Success Response (T) - Returns owned data of type T. #### Response Example N/A ``` ```APIDOC ## fn clone_into(&self, target: &mut T) ### Description Uses borrowed data to replace owned data, usually by cloning. ### Method Implicit (called on a borrowed reference) ### Endpoint N/A (Method on a type) ### Parameters - **target** (&mut T) - Required - A mutable reference to the owned data to be replaced. ### Request Example N/A ### Response #### Success Response () - This method does not return a value; it modifies the `target` in place. #### Response Example N/A ``` -------------------------------- ### Implementations of FusedLog Source: https://docs.rs/moxcms/0.8.1/moxcms/trait.FusedLog.html Details the implementations of the FusedLog trait for Rgb and Rgb. ```APIDOC ## Implementors ### impl FusedLog> for Rgb ### impl FusedLog> for Rgb ``` -------------------------------- ### Implement TryFrom for LutType Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.LutType.html Allows attempting to convert a u32 integer into a LutType, returning an error on failure. ```rust type Error = CmsError ``` ```rust fn try_from(value: u32) -> Result ``` -------------------------------- ### Implement CloneToUninit for T (Nightly) Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.LutWarehouse.html A nightly-only experimental API for performing copy-assignment from `self` to an uninitialized memory location `dest`. Requires the type T to implement Clone. ```rust unsafe fn clone_to_uninit(&self, dest: *mut u8) ``` -------------------------------- ### Implement PartialEq for ProfileSignature Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.ProfileSignature.html Enables equality comparison between ProfileSignature values. This allows checking if two signatures are the same. ```rust impl PartialEq for ProfileSignature { fn eq(&self, other: &ProfileSignature) -> bool { Tests for `self` and `other` values to be equal, and is used by `==`. } fn ne(&self, other: &Rhs) -> bool { Tests for `!=`. The default implementation is almost always sufficient, and should not be overridden without very good reason. } } ``` -------------------------------- ### Blanket Implementations Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.TransformOptions.html Overview of standard library blanket implementations available for types like TransformOptions. ```APIDOC ## Blanket Implementations ### Description Standard library traits automatically implemented for types, providing common functionality such as borrowing, cloning, and type conversion. ### Available Traits - **Any**: Provides `type_id()`. - **Borrow**: Provides `borrow()`. - **BorrowMut**: Provides `borrow_mut()`. - **CloneToUninit**: Provides `clone_to_uninit()` (Nightly). - **From**: Provides `from()`. - **Into**: Provides `into()`. - **ToOwned**: Provides `to_owned()` and `clone_into()`. - **TryFrom**: Provides `try_from()`. - **TryInto**: Provides `try_into()`. ``` -------------------------------- ### Create Cube from Array Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Cube.html Constructs a new Cube from a flat array of f32 values. Requires grid size and channel count. Returns a Result. ```rust pub fn new( array: &[f32], grid_size: usize, channels: usize, ) -> Result, CmsError> ``` -------------------------------- ### Rgb Division Implementations Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Rgb.html Details the `Div` and `DivAssign` trait implementations for `Rgb`. ```APIDOC ## Div for Rgb ### Description Performs the `/` operation for `Rgb` with a value of the same type `T`. ### Type Alias `Output = Rgb` ### Method `div(self, rhs: T) -> Self::Output` Performs the `/` operation. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` ```APIDOC ## Div for Rgb ### Description Performs the `/` operation for `Rgb` with another `Rgb`. ### Type Alias `Output = Rgb` ### Method `div(self, rhs: Self) -> Self::Output` Performs the `/` operation. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` ```APIDOC ## DivAssign for Rgb ### Description Performs the `/=` operation for `Rgb` with an `f32`. ### Method `div_assign(&mut self, rhs: f32)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` ```APIDOC ## DivAssign for Rgb ### Description Performs the `/=` operation for `Rgb` with an `f64`. ### Method `div_assign(&mut self, rhs: f64)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` ```APIDOC ## DivAssign for Rgb ### Description Performs the `/=` operation for `Rgb` with an `i16`. ### Method `div_assign(&mut self, rhs: i16)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` ```APIDOC ## DivAssign for Rgb ### Description Performs the `/=` operation for `Rgb` with an `i32`. ### Method `div_assign(&mut self, rhs: i32)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` ```APIDOC ## DivAssign for Rgb ### Description Performs the `/=` operation for `Rgb` with an `i8`. ### Method `div_assign(&mut self, rhs: i8)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` ```APIDOC ## DivAssign for Rgb ### Description Performs the `/=` operation for `Rgb` with a `u16`. ### Method `div_assign(&mut self, rhs: u16)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` ```APIDOC ## DivAssign for Rgb ### Description Performs the `/=` operation for `Rgb` with a `u32`. ### Method `div_assign(&mut self, rhs: u32)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` ```APIDOC ## DivAssign for Rgb ### Description Performs the `/=` operation for `Rgb` with a `u8`. ### Method `div_assign(&mut self, rhs: u8)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` ```APIDOC ## DivAssign for Rgb ### Description Performs the `/=` operation for `Rgb` with another `Rgb`. ### Method `div_assign(&mut self, rhs: Self)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### Constants in moxcms-0.8.1 Source: https://docs.rs/moxcms/0.8.1/moxcms/all.html Overview of the constants available in the moxcms-0.8.1 library. ```APIDOC ## Constants This section lists and describes the various constants available in the moxcms-0.8.1 library. ### BT2020_MATRIX Matrix for the BT.2020 color space. ### DISPLAY_P3_MATRIX Matrix for the Display P3 color space. ### HLG_LUT_TABLE Lookup table for HLG (Hybrid Log-Gamma). ### PQ_LUT_TABLE Lookup table for PQ (Perceptual Quantizer). ### SRGB_MATRIX Matrix for the sRGB color space. ### WHITE_POINT_D50 White point coordinates for D50 illuminant. ### WHITE_POINT_D60 White point coordinates for D60 illuminant. ### WHITE_POINT_D65 White point coordinates for D65 illuminant. ### WHITE_POINT_DCI_P3 White point coordinates for DCI-P3 illuminant. ``` -------------------------------- ### PartialEq Implementation for ProfileSignature Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.ProfileSignature.html Provides methods for comparing ProfileSignature values for equality. ```APIDOC ### impl PartialEq for ProfileSignature #### fn eq(&self, other: &ProfileSignature) -> bool Tests for `self` and `other` values to be equal, and is used by `==`. #### fn ne(&self, other: &Rhs) -> bool Tests for `!=`. ``` -------------------------------- ### ICtCp Implementations Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.ICtCp.html Methods available for the ICtCp struct. ```APIDOC ## Implementations ### impl ICtCp #### `pub const fn new(i: f32, ct: f32, cp: f32) -> ICtCp` Creates a new ICtCp instance. #### `pub fn from_xyz(xyz: Xyz) -> ICtCp` Converts XYZ D65 to ICtCp. #### `pub fn from_linear_rgb(rgb: Rgb, matrix: Matrix3f) -> ICtCp` Converts to ICtCp from linear light Rgb. Precompute forward matrix by ICtCp::prepare_to_lms. D65 white point is assumed. #### `pub fn to_linear_rgb(&self, matrix: Matrix3f) -> Rgb` Converts ICtCp to Rgb. Precompute forward matrix by ICtCp::prepare_to_lms and then inverse it. #### `pub fn to_xyz(&self) -> Xyz` Converts ICtCp to XYZ D65. #### `pub const fn prepare_to_lms(rgb_to_xyz: Matrix3f) -> Matrix3f` Prepares RGB->LMS matrix. ``` -------------------------------- ### Implement CloneToUninit for T Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Matrix3.html Provides an unsafe method to clone a value into uninitialized memory. Requires T to implement Clone. This is a nightly-only experimental API. ```rust impl CloneToUninit for T where T: Clone, Source§ #### unsafe fn clone_to_uninit(&self, dest: *mut u8) ``` -------------------------------- ### Create New Xyzd Instance Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Xyzd.html Creates a new Xyzd instance with specified x, y, and z values. This is a constant function, meaning it can be evaluated at compile time. ```rust pub const fn new(x: f64, y: f64, z: f64) -> Self ``` -------------------------------- ### CloneToUninit Trait (Nightly Only) Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.DataColorSpace.html Performs copy-assignment from self to dest. This is an experimental API and requires the nightly toolchain. ```APIDOC ## unsafe fn clone_to_uninit(&self, dest: *mut u8) ### Description Performs copy-assignment from `self` to `dest`. This is a nightly-only experimental API. ### Method `clone_to_uninit` ### Endpoint N/A (Trait implementation) ### Parameters - `dest` (*mut u8) - The destination pointer. ### Request Body None ### Request Example None ### Response #### Success Response (200) N/A (Trait method) #### Response Example None ``` -------------------------------- ### Implement Copy for ProfileVersion Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.ProfileVersion.html Indicates that ProfileVersion instances can be copied implicitly. This is common for simple enums. ```rust impl Copy for ProfileVersion {} ``` -------------------------------- ### Create Jzazbz from CIE Xyz Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Jzazbz.html Creates a new Jzazbz from CIE Xyz. Note that JzAzBz is defined in D65 white point, so XYZ may need adaptation. ```rust pub fn from_xyz(xyz: Xyz) -> Jzazbz ``` -------------------------------- ### PartialEq Implementation for MatrixCoefficients Source: https://docs.rs/moxcms/0.8.1/moxcms/enum.MatrixCoefficients.html Enables comparison of MatrixCoefficients values for equality. ```APIDOC ## Trait Implementation: PartialEq for MatrixCoefficients ### eq(&self, other: &MatrixCoefficients) -> bool Tests for `self` and `other` values to be equal. ### ne(&self, other: &Rhs) -> bool Tests for `!=`. ``` -------------------------------- ### Blanket Implementations for Cube Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Cube.html Details on blanket implementations applied to the Cube struct. ```APIDOC ## Blanket Implementations ### impl Any for T #### fn type_id(&self) -> TypeId Gets the `TypeId` of `self`. ### impl Borrow for T #### fn borrow(&self) -> &T Immutably borrows from an owned value. ### impl BorrowMut for T #### fn borrow_mut(&mut self) -> &mut T Mutably borrows from an owned value. ### impl From for T #### fn from(t: T) -> T Returns the argument unchanged. ### impl Into for T #### fn into(self) -> U Calls `U::from(self)`. ### impl TryFrom for T #### type Error = Infallible The type returned in the event of a conversion error. #### fn try_from(value: U) -> Result>::Error> Performs the conversion. ### impl TryInto for T #### type Error = >::Error The type returned in the event of a conversion error. #### fn try_into(self) -> Result>::Error> Performs the conversion. ``` -------------------------------- ### Oklab Partial Comparison Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.Oklab.html Compares two Oklab colors and returns an ordering if one exists. Used for operators like `<`, `<=`, `>`, `>=`. ```rust fn partial_cmp(&self, other: &Oklab) -> Option ``` -------------------------------- ### Partial Comparison Implementation for TransformOptions Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.TransformOptions.html Provides partial ordering comparisons for TransformOptions. ```rust fn partial_cmp(&self, other: &TransformOptions) -> Option ``` -------------------------------- ### ColorProfile Utility Methods Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.ColorProfile.html Utility methods for interacting with ColorProfile instances. ```APIDOC ## impl ColorProfile ### `version` Returns profile version. #### Returns - **ProfileVersion** - The version of the profile. ### `new_from_slice` Creates a new ColorProfile from a byte slice. #### Parameters - **slice** (&[u8]) - The byte slice containing profile data. #### Returns - **Result** - A Result containing the ColorProfile or a CmsError. ### `new_from_slice_with_options` Creates a new ColorProfile from a byte slice with specified parsing options. #### Parameters - **slice** (&[u8]) - The byte slice containing profile data. - **options** (ParsingOptions) - Options for parsing the profile. #### Returns - **Result** - A Result containing the ColorProfile or a CmsError. ``` -------------------------------- ### adapt_to_illuminant_d Function Signature Source: https://docs.rs/moxcms/0.8.1/moxcms/fn.adapt_to_illuminant_d.html This function signature defines how to adapt color values to a new illuminant, typically used in color science for profile transformations. It requires a 3x3 matrix, source white point, and target illuminant XYZ coordinates. ```rust pub const fn adapt_to_illuminant_d( r: Matrix3d, source_white_pt: XyY, illuminant_xyz: Xyz, ) -> Matrix3d ``` -------------------------------- ### Create ColorProfile from CICP Source: https://docs.rs/moxcms/0.8.1/moxcms/struct.ColorProfile.html Creates a new ColorProfile instance initialized from CICP color primaries. This is useful for setting up profiles based on standard video color information. ```rust pub fn new_from_cicp(cicp_color_primaries: CicpProfile) -> ColorProfile ```