Skip to main content

CmsQuote

Struct CmsQuote 

Source
#[non_exhaustive]
pub struct CmsQuote {
Show 13 fields pub supports_u8: bool, pub supports_u16: bool, pub supports_f16: bool, pub supports_f32: bool, pub supports_cmyk: bool, pub supports_absolute_colorimetric: bool, pub supports_float_mpe: bool, pub build_memory_bytes: Option<u64>, pub transform_memory_bytes: Option<u64>, pub apply_scratch_bytes: Option<u64>, pub peak_stack_bytes: Option<u32>, pub small_stack_qualified: bool, pub concurrent_apply: bool,
}
Expand description

Conservative capability, memory, stack, and concurrency quote for a CmsBinding.

Hosts and routing planners inspect this quote before admitting a CMS transform against memory limits, constrained thread stacks (such as 256 KiB IIS worker stacks), or concurrency pools. None means the bound is unknown/unproven for arbitrary profiles and cannot authorize a strict hard limit without route qualification or explicit best-effort policy.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§supports_u8: bool

Supports SampleType::U8 transforms.

§supports_u16: bool

Supports SampleType::U16 transforms.

§supports_f16: bool

Supports SampleType::F16 transforms.

§supports_f32: bool

Supports SampleType::F32 transforms.

§supports_cmyk: bool

Supports ColorSpace::Cmyk ink transforms.

§supports_absolute_colorimetric: bool

Supports RenderingIntent::AbsoluteColorimetric (media-white / chad un-adaptation).

§supports_float_mpe: bool

Supports ICC v4 float D2B*/B2D* MPE pipelines.

§build_memory_bytes: Option<u64>

Proven conservative heap bytes allocated while building one transform (None = unknown).

§transform_memory_bytes: Option<u64>

Proven conservative heap bytes retained per live CmsTransform (None = unknown).

§apply_scratch_bytes: Option<u64>

Proven conservative heap bytes allocated per transform_row call (Some(0) = zero-alloc apply; None = unknown).

§peak_stack_bytes: Option<u32>

Proven conservative peak stack bytes consumed by build_transform / transform_row (None = unknown).

§small_stack_qualified: bool

Whether build_transform and transform_row are qualified for constrained 256 KiB stacks.

§concurrent_apply: bool

Whether concurrent transform_row calls across threads are lock-free / contention-free.

Implementations§

Source§

impl CmsQuote

Source

pub const fn new() -> Self

Conservative empty quote with all capabilities disabled, unknown bounds (None), and small_stack_qualified = false.

Source

pub const fn with_u8(self, yes: bool) -> Self

Set U8 support.

Source

pub const fn with_u16(self, yes: bool) -> Self

Set U16 support.

Source

pub const fn with_f16(self, yes: bool) -> Self

Set F16 support.

Source

pub const fn with_f32(self, yes: bool) -> Self

Set F32 support.

Source

pub const fn with_cmyk(self, yes: bool) -> Self

Set ColorSpace::Cmyk support.

Source

pub const fn with_absolute_colorimetric(self, yes: bool) -> Self

Set RenderingIntent::AbsoluteColorimetric support.

Source

pub const fn with_float_mpe(self, yes: bool) -> Self

Set ICC v4 float MPE (D2B*/B2D*) support.

Source

pub const fn with_build_memory_bytes(self, bytes: Option<u64>) -> Self

Set proven conservative heap bytes used while building one transform (None = unknown).

Source

pub const fn with_transform_memory_bytes(self, bytes: Option<u64>) -> Self

Set proven conservative heap bytes retained per live CmsTransform (None = unknown).

Source

pub const fn with_apply_scratch_bytes(self, bytes: Option<u64>) -> Self

Set proven conservative heap bytes allocated per transform_row call (Some(0) = zero-alloc apply).

Source

pub const fn with_peak_stack_bytes(self, bytes: Option<u32>) -> Self

Set proven conservative peak stack bytes used by build_transform and transform_row.

Source

pub const fn with_small_stack_qualified(self, yes: bool) -> Self

Declare whether this backend is qualified for constrained 256 KiB thread stacks.

Source

pub const fn with_concurrent_apply(self, yes: bool) -> Self

Declare whether concurrent transform_row calls across threads are contention-free.

Trait Implementations§

Source§

impl Clone for CmsQuote

Source§

fn clone(&self) -> CmsQuote

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for CmsQuote

Source§

impl Debug for CmsQuote

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CmsQuote

Source§

fn default() -> CmsQuote

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

impl Eq for CmsQuote

Source§

impl Hash for CmsQuote

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for CmsQuote

Source§

fn eq(&self, other: &CmsQuote) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CmsQuote

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.