pub struct TileConfig {
pub tile_cols: u32,
pub tile_rows: u32,
pub threads: usize,
}Expand description
Configuration for the tile grid used during parallel encoding.
Tile counts must be positive integers ≤ 64. A threads value of 0
means “use Rayon’s global thread pool size”.
Fields§
§tile_cols: u32Number of tile columns (1–64).
tile_rows: u32Number of tile rows (1–64).
threads: usizeWorker thread count (0 = auto).
Implementations§
Source§impl TileConfig
impl TileConfig
Sourcepub fn new(tile_cols: u32, tile_rows: u32, threads: usize) -> CodecResult<Self>
pub fn new(tile_cols: u32, tile_rows: u32, threads: usize) -> CodecResult<Self>
Create a validated TileConfig.
§Errors
Returns CodecError::InvalidParameter if:
tile_colsortile_rowsis 0 or greater than 64, or- the total tile count exceeds 4 096.
Sourcepub const fn tile_count(&self) -> u32
pub const fn tile_count(&self) -> u32
Total number of tiles.
Sourcepub fn thread_count(&self) -> usize
pub fn thread_count(&self) -> usize
Effective thread count (resolves 0 to the rayon pool size).
Trait Implementations§
Source§impl Clone for TileConfig
impl Clone for TileConfig
Source§fn clone(&self) -> TileConfig
fn clone(&self) -> TileConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TileConfig
impl Debug for TileConfig
Source§impl PartialEq for TileConfig
impl PartialEq for TileConfig
impl Eq for TileConfig
impl StructuralPartialEq for TileConfig
Auto Trait Implementations§
impl Freeze for TileConfig
impl RefUnwindSafe for TileConfig
impl Send for TileConfig
impl Sync for TileConfig
impl Unpin for TileConfig
impl UnsafeUnpin for TileConfig
impl UnwindSafe for TileConfig
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 more