pub struct SparseMtxData { /* private fields */ }Expand description
10x-like cell-feature matrix with zarr backend (feature x cell)
(root)
├── nrow
├── ncell
├── by_column
│ ├── data
│ ├── indices (row indices)
│ └── indptr (column pointers)
└── by_row
├── data
├── indices (column indices)
└── indptr (row pointers)Implementations§
Source§impl SparseMtxData
impl SparseMtxData
Sourcepub fn new(zarr_file: Option<&str>) -> Result<Self>
pub fn new(zarr_file: Option<&str>) -> Result<Self>
Create an empty new SparseMtxData instance with a zarr
backend file If no backend_file is provided, a temporary
file will be created.
backend_file- Optional zarr backend file
Sourcepub fn open(backend_file: &str) -> Result<Self>
pub fn open(backend_file: &str) -> Result<Self>
Create SparseMtxData instance from an existing zarr backend file
zarr_file- zarr backend file (directory or.zarr.zip)
Sourcepub fn from_mtx_file(
mtx_file: &str,
backend_file: Option<&str>,
index_by_row: Option<bool>,
) -> Result<Self>
pub fn from_mtx_file( mtx_file: &str, backend_file: Option<&str>, index_by_row: Option<bool>, ) -> Result<Self>
Create SparseMtxData from mtx file with backend_file as
the backend file. If no backend_file is provided, it will
be the same as mtx_file with .zarr extension.
mtx_file: mtx file to be read into zarr backendbackend_file: zarr file to be associated withindex_by_row: if true, the matrix will be indexed by row
Sourcepub fn from_ndarray(
array: &Array2<f32>,
zarr_file: Option<&str>,
index_by_row: Option<bool>,
) -> Result<Self>
pub fn from_ndarray( array: &Array2<f32>, zarr_file: Option<&str>, index_by_row: Option<bool>, ) -> Result<Self>
Create a new SparseMtxData instance from an ndarray array
array- 2D array to be added to the backendbackend_file- Optional zarr backend fileindex_by_row- Optional flag to index by row (CSR format)
Sourcepub fn from_dmatrix(
matrix: &DMatrix<f32>,
zarr_file: Option<&str>,
index_by_row: Option<bool>,
) -> Result<Self>
pub fn from_dmatrix( matrix: &DMatrix<f32>, zarr_file: Option<&str>, index_by_row: Option<bool>, ) -> Result<Self>
Create a new SparseMtxData instance from an DMatrix array
array- 2D array to be added to the backendbackend_file- Optional zarr backend fileindex_by_row- Optional flag to index by row (CSR format)
Sourcepub fn print_hierarchy(&self) -> Result<()>
pub fn print_hierarchy(&self) -> Result<()>
Show the hierarchy of the zarr store
Trait Implementations§
Source§impl Clone for SparseMtxData
impl Clone for SparseMtxData
Source§impl SparseIo for SparseMtxData
impl SparseIo for SparseMtxData
Source§fn read_row_indptr(&mut self) -> Result<()>
fn read_row_indptr(&mut self) -> Result<()>
Read row index pointers
Source§fn column_indptr(&self) -> &[u64]
fn column_indptr(&self) -> &[u64]
Read column index pointers
Source§fn preload_columns(&mut self) -> Result<()>
fn preload_columns(&mut self) -> Result<()>
preload columns’ values and indices
Source§fn preload_rows(&mut self) -> Result<()>
fn preload_rows(&mut self) -> Result<()>
preload rows’ values and indices
Source§fn record_mtx_shape(
&mut self,
mtx_shape: Option<(usize, usize, usize)>,
) -> Result<()>
fn record_mtx_shape( &mut self, mtx_shape: Option<(usize, usize, usize)>, ) -> Result<()>
Helper function to keep the matrix shape
Source§fn initialize_backend(&mut self) -> Result<()>
fn initialize_backend(&mut self) -> Result<()>
Helper function to create a new zarr backend file
Source§fn remove_backend_file(&self) -> Result<()>
fn remove_backend_file(&self) -> Result<()>
Clean up the backend file
Source§fn get_backend_file_name(&self) -> &str
fn get_backend_file_name(&self) -> &str
Access file name of the zarr backend
Source§fn to_mtx_file(&self, mtx_file: &str) -> Result<()>
fn to_mtx_file(&self, mtx_file: &str) -> Result<()>
Export the data to a mtx file. This will take time.
mtx_file: mtx file to be written
Source§fn register_row_names_file(&mut self, row_name_file: &str)
fn register_row_names_file(&mut self, row_name_file: &str)
Set row names for the matrix
row_name_file: a file each line contains row name words
Source§fn register_row_names_vec(&mut self, rows: &[Box<str>])
fn register_row_names_vec(&mut self, rows: &[Box<str>])
Set row names for the matrix
rows: a vector of row names
Source§fn register_column_names_file(&mut self, column_name_file: &str)
fn register_column_names_file(&mut self, column_name_file: &str)
Set column names for the matrix
column_name_file: a file each line contains column name words
Source§fn register_column_names_vec(&mut self, columns: &[Box<str>])
fn register_column_names_vec(&mut self, columns: &[Box<str>])
Set column names for the matrix
columns: a vector of column names
Source§fn num_columns(&self) -> Option<usize>
fn num_columns(&self) -> Option<usize>
Number of columns in the matrix
Source§fn num_non_zeros(&self) -> Option<usize>
fn num_non_zeros(&self) -> Option<usize>
Number of non-zero elements in the matrix
Source§fn register_names_file(
&mut self,
key: &str,
name_file: &str,
name_columns: Range<usize>,
name_sep: &str,
) -> Result<()>
fn register_names_file( &mut self, key: &str, name_file: &str, name_columns: Range<usize>, name_sep: &str, ) -> Result<()>
Add arbitrary names (a vector of strings)
group_name: group namename_file: a file each line contains name wordsname_columns: range of columns to be used for namename_sep: separator for name columns
Source§fn register_names_vec(&mut self, key: &str, names: &[Box<str>]) -> Result<()>
fn register_names_vec(&mut self, key: &str, names: &[Box<str>]) -> Result<()>
Add arbitrary names (a vector of strings)
group_name: group namenames: a file each line contains name words
Source§fn retrieve_registered_names(&self, key: &str) -> Result<Vec<Box<str>>>
fn retrieve_registered_names(&self, key: &str) -> Result<Vec<Box<str>>>
Get back the registered names
key: key for the registered names
Source§fn read_triplets_by_single_column(
&self,
j_data: usize,
) -> Result<(usize, usize, Vec<(u64, u64, f32)>)>
fn read_triplets_by_single_column( &self, j_data: usize, ) -> Result<(usize, usize, Vec<(u64, u64, f32)>)>
Read columns within the range and return a vector of triplets (row, col, value)
col: usize
Source§fn read_triplets_by_columns(
&self,
columns: Self::IndexIter,
) -> Result<(usize, usize, Vec<(u64, u64, f32)>)>
fn read_triplets_by_columns( &self, columns: Self::IndexIter, ) -> Result<(usize, usize, Vec<(u64, u64, f32)>)>
Read columns within the range and return dense ndarray::Array2
columns: range e.g., 0..3 -> [0, 1, 2] or vec![0, 1, 2]
Source§fn read_triplets_by_rows(
&self,
rows: Self::IndexIter,
) -> Result<(usize, usize, Vec<(u64, u64, f32)>)>
fn read_triplets_by_rows( &self, rows: Self::IndexIter, ) -> Result<(usize, usize, Vec<(u64, u64, f32)>)>
Read rows within the range and return a vector of triplets (row, col, value)
rows: range e.g., 0..3 -> [0, 1, 2] or vec![0, 1, 2]
Source§fn record_csr_dataset_backend(
&mut self,
csr_cols: &[u64],
csr_vals: &[f32],
csr_rowptr: &[u64],
) -> Result<()>
fn record_csr_dataset_backend( &mut self, csr_cols: &[u64], csr_vals: &[f32], csr_rowptr: &[u64], ) -> Result<()>
CSR data structure in Zarr backend
└── by_row
├── data
├── indices (column indices)
└── isndptr (row pointers)Source§fn record_csc_dataset_backend(
&mut self,
csc_rows: &[u64],
csc_vals: &[f32],
csc_colptr: &[u64],
) -> Result<()>
fn record_csc_dataset_backend( &mut self, csc_rows: &[u64], csc_vals: &[f32], csc_colptr: &[u64], ) -> Result<()>
CSC data structure in Zarr backend
Helper function to record the CSC dataset
├── by_column
│ ├── data
│ ├── indices (row indices)
│ └── indptr (column pointers)type IndexIter = Vec<usize>
Source§fn row_indptr(&self) -> &[u64]
fn row_indptr(&self) -> &[u64]
column_indptr, empty when absent.Source§fn metadata(&self) -> Metadata
fn metadata(&self) -> Metadata
meta for the keys programs share); empty
when none were set.Source§fn set_metadata(&mut self, values: &Metadata) -> Result<()>
fn set_metadata(&mut self, values: &Metadata) -> Result<()>
meta as the data’s metadata, replacing what was there. It
needs a writable backend: one being created (set it before zipping),
or an unzipped zarr store. A zipped zarr store, or an HDF5 file opened
to read, refuses it.Source§fn reopen_backend(&mut self) -> Result<()>
fn reopen_backend(&mut self) -> Result<()>
Source§fn read_column_indptr(&mut self) -> Result<()>
fn read_column_indptr(&mut self) -> Result<()>
Source§fn clean_preloaded_columns(&mut self)
fn clean_preloaded_columns(&mut self)
Source§fn clean_preloaded_rows(&mut self)
fn clean_preloaded_rows(&mut self)
Source§fn backend_type(&self) -> SparseIoBackend
fn backend_type(&self) -> SparseIoBackend
fn row_names(&self) -> Result<Vec<Box<str>>>
fn column_names(&self) -> Result<Vec<Box<str>>>
Source§fn csc_column_arrays(&self) -> Option<(&[u64], &[u64], &[f32])>
fn csc_column_arrays(&self) -> Option<(&[u64], &[u64], &[f32])>
(indptr, indices, data). Returns None when the backend has
not preloaded columns or doesn’t support direct array access.
Callers (e.g. SparseIoVec::read_columns_csc) use this to skip
the triplet roundtrip when columns are already in memory.Source§fn cs_create(&mut self, key: CsKey, len: usize) -> Result<()>
fn cs_create(&mut self, key: CsKey, len: usize) -> Result<()>
len elements for the
given CSC/CSR slot. No data is written yet.Source§fn cs_write_u64(&mut self, key: CsKey, offset: u64, data: &[u64]) -> Result<()>
fn cs_write_u64(&mut self, key: CsKey, offset: u64, data: &[u64]) -> Result<()>
u64 slab at offset in the specified dataset.
Used for CSC/CSR indices and indptr.Source§fn cs_write_f32(&mut self, key: CsKey, offset: u64, data: &[f32]) -> Result<()>
fn cs_write_f32(&mut self, key: CsKey, offset: u64, data: &[f32]) -> Result<()>
f32 slab at offset in the specified dataset.
Used for CSC/CSR data.Source§fn read_columns_ndarray(&self, columns: Self::IndexIter) -> Result<Array2<f32>>
fn read_columns_ndarray(&self, columns: Self::IndexIter) -> Result<Array2<f32>>
ndarray::Array2 Read moreSource§fn read_columns_tensor(&self, columns: Self::IndexIter) -> Result<Tensor>
fn read_columns_tensor(&self, columns: Self::IndexIter) -> Result<Tensor>
candle_core::Tensor Read moreSource§fn read_columns_dmatrix(&self, columns: Self::IndexIter) -> Result<DMatrix<f32>>
fn read_columns_dmatrix(&self, columns: Self::IndexIter) -> Result<DMatrix<f32>>
nalgebrea::DMatrix Read moreSource§fn read_columns_csr(&self, columns: Self::IndexIter) -> Result<CsrMatrix<f32>>
fn read_columns_csr(&self, columns: Self::IndexIter) -> Result<CsrMatrix<f32>>
CsrMatrix Read moreSource§fn read_columns_csc(&self, columns: Self::IndexIter) -> Result<CscMatrix<f32>>
fn read_columns_csc(&self, columns: Self::IndexIter) -> Result<CscMatrix<f32>>
CsrMatrix Read moreSource§fn read_rows_ndarray(&self, rows: Self::IndexIter) -> Result<Array2<f32>>
fn read_rows_ndarray(&self, rows: Self::IndexIter) -> Result<Array2<f32>>
ndarray::Array2 Read moreSource§fn read_rows_tensor(&self, rows: Self::IndexIter) -> Result<Tensor>
fn read_rows_tensor(&self, rows: Self::IndexIter) -> Result<Tensor>
candle_core::Tensor Read moreSource§fn read_rows_dmatrix(&self, rows: Self::IndexIter) -> Result<DMatrix<f32>>
fn read_rows_dmatrix(&self, rows: Self::IndexIter) -> Result<DMatrix<f32>>
nalgebra::DMatrix Read moreSource§fn read_rows_csr(&self, rows: Self::IndexIter) -> Result<CsrMatrix<f32>>
fn read_rows_csr(&self, rows: Self::IndexIter) -> Result<CsrMatrix<f32>>
CsrMatrix Read moreSource§fn read_rows_csc(&self, rows: Self::IndexIter) -> Result<CscMatrix<f32>>
fn read_rows_csc(&self, rows: Self::IndexIter) -> Result<CscMatrix<f32>>
CscMatrix Read moreSource§fn import_mtx_file(&mut self, mtx_file: &str, index_by_row: bool) -> Result<()>
fn import_mtx_file(&mut self, mtx_file: &str, index_by_row: bool) -> Result<()>
index_by_row. Both are
streamed out of the same triplet vector, so the file is inflated once
and the triplets are the only full-size structure alive. Read moreSource§fn import_dmatrix_by_row(&mut self, matrix: &DMatrix<f32>) -> Result<()>
fn import_dmatrix_by_row(&mut self, matrix: &DMatrix<f32>) -> Result<()>
Source§fn import_dmatrix_by_col(&mut self, matrix: &DMatrix<f32>) -> Result<()>
fn import_dmatrix_by_col(&mut self, matrix: &DMatrix<f32>) -> Result<()>
Source§fn import_ndarray_by_row(&mut self, array: &Array2<f32>) -> Result<()>
fn import_ndarray_by_row(&mut self, array: &Array2<f32>) -> Result<()>
Source§fn import_ndarray_by_col(&mut self, array: &Array2<f32>) -> Result<()>
fn import_ndarray_by_col(&mut self, array: &Array2<f32>) -> Result<()>
Source§fn column_nnz(&self, col: usize) -> Option<u64>
fn column_nnz(&self, col: usize) -> Option<u64>
Source§fn set_meta(&mut self, key: &str, value: &str) -> Result<()>
fn set_meta(&mut self, key: &str, value: &str) -> Result<()>
Source§fn subset_columns_rows(
&mut self,
columns: Option<&Vec<usize>>,
rows: Option<&Vec<usize>>,
) -> Result<()>
fn subset_columns_rows( &mut self, columns: Option<&Vec<usize>>, rows: Option<&Vec<usize>>, ) -> Result<()>
columns and the rows rows of the data, each in
the order listed (None keeps that side whole), replacing the
backend’s content. The result is streamed into a sibling and swapped
in once complete, so a refused selection leaves the data as it was. Read moreSource§fn reorder_rows(&mut self, row_names_order: &[Box<str>]) -> Result<()>
fn reorder_rows(&mut self, row_names_order: &[Box<str>]) -> Result<()>
row_names_order: row i of the
result is the row named row_names_order[i], all-zero when the data
has no such row; rows whose name is not listed are dropped. The result
is streamed into a sibling and swapped in once complete, like
subset_columns_rows. Read moreSource§fn record_triplets_by_row(
&mut self,
row_col_val_triplets: &mut Vec<(u64, u64, f32)>,
) -> Result<()>
fn record_triplets_by_row( &mut self, row_col_val_triplets: &mut Vec<(u64, u64, f32)>, ) -> Result<()>
record_triplets_by_col.Source§fn record_triplets_by_col(
&mut self,
row_col_val_triplets: &mut Vec<(u64, u64, f32)>,
) -> Result<()>
fn record_triplets_by_col( &mut self, row_col_val_triplets: &mut Vec<(u64, u64, f32)>, ) -> Result<()>
Source§fn begin_streaming_csc(&mut self, shape: (usize, usize, usize)) -> Result<()>
fn begin_streaming_csc(&mut self, shape: (usize, usize, usize)) -> Result<()>
/by_column/{data, indices, indptr} at their final sizes
so subsequent append_csc_slab calls write
into disjoint hyperslabs without further allocation.Source§fn append_csc_slab(
&mut self,
col_offset: u64,
nnz_offset: u64,
local_colptr: &[u64],
row_indices: &[u64],
values: &[f32],
) -> Result<()>
fn append_csc_slab( &mut self, col_offset: u64, nnz_offset: u64, local_colptr: &[u64], row_indices: &[u64], values: &[f32], ) -> Result<()>
Source§fn finalize_streaming_csc(&mut self) -> Result<()>
fn finalize_streaming_csc(&mut self) -> Result<()>
ncol, equal to the total nnz.Source§fn begin_streaming_csr(&mut self, shape: (usize, usize, usize)) -> Result<()>
fn begin_streaming_csr(&mut self, shape: (usize, usize, usize)) -> Result<()>
begin_streaming_csc.Source§fn append_csr_slab(
&mut self,
row_offset: u64,
nnz_offset: u64,
local_rowptr: &[u64],
col_indices: &[u64],
values: &[f32],
) -> Result<()>
fn append_csr_slab( &mut self, row_offset: u64, nnz_offset: u64, local_rowptr: &[u64], col_indices: &[u64], values: &[f32], ) -> Result<()>
append_csc_slab, with the same audits. Read moreSource§fn finalize_streaming_csr(&mut self) -> Result<()>
fn finalize_streaming_csr(&mut self) -> Result<()>
nrow,
load the row index, and check the appended count against the declared
nnz – the one violation the written indptr cannot reveal.Source§fn build_csr_from_csc_streaming(&mut self) -> Result<()>
fn build_csr_from_csc_streaming(&mut self) -> Result<()>
/by_row/{data, indices, indptr} by transposing the already-
written CSC data on disk: one pass over the CSC to count each row,
then one scatter pass per row band. The band is as large as the
process-wide preload budget and the memory available now allow
(never under SLAB_BUDGET_BYTES), so a matrix that fits is
transposed in a single scatter pass.Auto Trait Implementations§
impl !RefUnwindSafe for SparseMtxData
impl !UnwindSafe for SparseMtxData
impl Forget for SparseMtxData
impl Freeze for SparseMtxData
impl Move for SparseMtxData
impl Send for SparseMtxData
impl Sync for SparseMtxData
impl Unpin for SparseMtxData
impl UnsafeUnpin for SparseMtxData
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
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) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
replaced by palette::chromatic_adaptation::AdaptIntoUnclamped
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
replaced by palette::chromatic_adaptation::AdaptIntoUnclamped
Source§impl<T, C> AdaptIntoUnclamped<T> for Cwhere
T: AdaptFromUnclamped<C>,
impl<T, C> AdaptIntoUnclamped<T> for Cwhere
T: AdaptFromUnclamped<C>,
Source§type Scalar = <T as AdaptFromUnclamped<C>>::Scalar
type Scalar = <T as AdaptFromUnclamped<C>>::Scalar
Source§fn adapt_into_unclamped_with<M>(self) -> Twhere
M: LmsToXyz<<C as AdaptIntoUnclamped<T>>::Scalar> + XyzToLms<<C as AdaptIntoUnclamped<T>>::Scalar>,
fn adapt_into_unclamped_with<M>(self) -> Twhere
M: LmsToXyz<<C as AdaptIntoUnclamped<T>>::Scalar> + XyzToLms<<C as AdaptIntoUnclamped<T>>::Scalar>,
Source§impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Source§fn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Source§impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Source§fn arrays_into(self) -> C
fn arrays_into(self) -> C
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Source§type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Source§fn components_from(colors: C) -> T
fn components_from(colors: C) -> T
Source§impl<T, C> ComponentsInto<C> for T
impl<T, C> ComponentsInto<C> for T
Source§fn components_into(self) -> C
fn components_into(self) -> C
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Source§fn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle.Source§impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Source§fn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other into Self, while performing the appropriate scaling,
rounding and clamping.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Source§fn into_angle(self) -> U
fn into_angle(self) -> U
T.Source§impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Source§type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Source§fn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self into T, while performing the appropriate scaling,
rounding and clamping.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.Source§impl<U, T> ToOwnedTable<U> for Twhere
U: FromTableRef<T>,
impl<U, T> ToOwnedTable<U> for Twhere
U: FromTableRef<T>,
fn to_owned_table(&self) -> U
Source§impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Source§type Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors fails to cast.Source§fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read more