Skip to main content

Limits

Struct Limits 

Source
pub struct Limits<R: Resource> { /* private fields */ }
Expand description

Validated finite ceilings for the resources used by one operation.

Implementations§

Source§

impl Limits<CompilationResource>

Source

pub fn new( source_pages: u64, artifacts: u64, pixels_per_artifact: u64, total_pixels: u64, artifact_bytes: u64, retained_artifact_bytes: u64, export_workers: u64, ) -> Self

Constructs validated mandatory finite compilation ceilings.

Source

pub const fn reference_v1() -> Self

The first-party bounded compilation export profile.

Source

pub fn with_export_workers(self, export_workers: u64) -> Self

Replaces the export-worker ceiling while preserving every other limit.

Source

pub const fn source_pages(&self) -> u64

Source

pub const fn artifacts(&self) -> u64

Source

pub const fn pixels_per_artifact(&self) -> u64

Source

pub const fn total_pixels(&self) -> u64

Source

pub const fn artifact_bytes(&self) -> u64

Source

pub const fn retained_artifact_bytes(&self) -> u64

Source

pub const fn export_workers(&self) -> u64

Source§

impl Limits<FilesystemFontResource>

Source

pub fn new( visited_entries: u64, accepted_containers: u64, container_bytes: u64, total_accepted_bytes: u64, ) -> Self

Constructs validated mandatory finite reading ceilings.

Source

pub const fn reference_v1() -> Self

The first-party limits for filesystem font sources.

Source

pub const fn visited_entries(&self) -> u64

Source

pub const fn accepted_containers(&self) -> u64

Source

pub const fn container_bytes(&self) -> u64

Source

pub const fn total_accepted_bytes(&self) -> u64

Source§

impl Limits<FilesystemPackageResource>

Source

pub fn new( visited_entries: u64, selected_files: u64, selected_file_bytes: u64, package_tree_bytes: u64, ) -> Self

Source

pub const fn reference_v1() -> Self

The first-party limits for package trees read from filesystems.

Source

pub const fn visited_entries(&self) -> u64

Source

pub const fn selected_files(&self) -> u64

Source

pub const fn selected_file_bytes(&self) -> u64

Source

pub const fn package_tree_bytes(&self) -> u64

Source§

impl Limits<FilesystemProjectResource>

Source

pub fn new( visited_entries: u64, selected_files: u64, root_policy_bytes: u64, selected_file_bytes: u64, total_selected_bytes: u64, ) -> Self

Constructs validated mandatory finite reading ceilings.

Source

pub const fn reference_v1() -> Self

The first-party limits for filesystem projects.

Source

pub const fn visited_entries(&self) -> u64

Source

pub const fn selected_files(&self) -> u64

Source

pub const fn root_policy_bytes(&self) -> u64

Source

pub const fn selected_file_bytes(&self) -> u64

Source

pub const fn total_selected_bytes(&self) -> u64

Source§

impl<R: Resource> Limits<R>

Source

pub fn ceiling(&self, resource: R) -> u64

Returns the finite ceiling for one resource.

Source§

impl Limits<PackageTreeReadResource>

Source

pub fn new(ceilings: PackageTreeReadCeilings) -> Self

Validates every named Package Tree Read ceiling.

Source

pub const fn reference_v1() -> Self

The validated first-party version-1 limits.

Source

pub const fn listed_entries(&self) -> u64

The maximum number of entries yielded across attempted tree sources.

Source

pub const fn listed_path_bytes(&self) -> u64

The maximum byte length of one yielded operation path.

Source

pub const fn total_listed_path_bytes(&self) -> u64

The maximum retained bytes for paths and structural evidence.

Source

pub const fn selected_files(&self) -> u64

The maximum selected file count.

Source

pub const fn object_bytes(&self) -> u64

The maximum exact bytes retained for one selected file.

Source

pub const fn total_bytes(&self) -> u64

The maximum exact bytes retained for the selected Package Tree.

Source§

impl Limits<PackageArchiveReadResource>

Source

pub fn new(ceilings: PackageArchiveReadCeilings) -> Self

Validates the named raw archive ceiling.

Source

pub const fn reference_v1() -> Self

The validated first-party version-1 limits.

Source

pub const fn archive_bytes(&self) -> u64

The maximum exact raw archive bytes retained from one candidate.

Source§

impl Limits<PackageReadResource>

Source

pub fn new(ceilings: PackageReadCeilings) -> Self

Validates both Package Read limit families.

Source

pub const fn trees(&self) -> PackageTreeReadLimits

Limits shared across ordered Package Tree candidates.

Source

pub const fn archives(&self) -> PackageArchiveReadLimits

Limits applied independently to cache and registry candidates.

Source

pub const fn reference_v1() -> Self

The validated first-party version-1 composite limits.

Source§

impl Limits<ProjectReadResource>

Source

pub fn new(ceilings: ProjectReadCeilings) -> Self

Validates all named read ceilings.

Source

pub const fn reference_v1() -> Self

The validated first-party version-1 Project Read limits.

Source

pub const fn listed_entries(&self) -> u64

Source

pub const fn listed_path_bytes(&self) -> u64

Source

pub const fn total_listed_path_bytes(&self) -> u64

Source

pub const fn selected_files(&self) -> u64

Source

pub const fn object_bytes(&self) -> u64

Source

pub const fn total_bytes(&self) -> u64

Source§

impl Limits<FontReadResource>

Source

pub fn new(ceilings: FontReadCeilings) -> Self

Validates all named read ceilings.

Source

pub const fn reference_v1() -> Self

The validated first-party version-1 Font Read limits.

Source

pub const fn listed_entries(&self) -> u64

Source

pub const fn listed_path_bytes(&self) -> u64

Source

pub const fn total_listed_path_bytes(&self) -> u64

Source

pub const fn selected_containers(&self) -> u64

Source

pub const fn container_bytes(&self) -> u64

Source

pub const fn total_bytes(&self) -> u64

Source§

impl Limits<ReadResource>

Source

pub fn new(archive_bytes: u64) -> Self

Constructs a validated read ceiling.

Source

pub const fn reference_v1() -> Self

The first-party read limit for version-1 Pack Archives.

Source

pub const fn archive_bytes(&self) -> u64

Source§

impl Limits<EncodeResource>

Source

pub fn new( archive_bytes: u64, members: u64, generated_member_name_bytes: u64, manifest_bytes: u64, member_bytes: u64, total_content_bytes: u64, ) -> Self

Constructs a validated set of mandatory finite encode ceilings.

Source

pub const fn reference_v1() -> Self

The first-party limits for version-1 Pack Archives.

Source

pub const fn archive_bytes(&self) -> u64

Source

pub const fn members(&self) -> u64

Source

pub const fn generated_member_name_bytes(&self) -> u64

Source

pub const fn manifest_bytes(&self) -> u64

Source

pub const fn member_bytes(&self) -> u64

Source

pub const fn total_content_bytes(&self) -> u64

Source§

impl Limits<DecodeResource>

Source

pub fn new( archive_bytes: u64, members: u64, raw_member_name_bytes: u64, manifest_bytes: u64, member_bytes: u64, total_content_bytes: u64, ) -> Self

Constructs a validated set of mandatory finite decode ceilings.

Source

pub const fn reference_v1() -> Self

The first-party limits for version-1 Pack Archives.

Source

pub const fn archive_bytes(&self) -> u64

Source

pub const fn members(&self) -> u64

Source

pub const fn raw_member_name_bytes(&self) -> u64

Source

pub const fn manifest_bytes(&self) -> u64

Source

pub const fn member_bytes(&self) -> u64

Source

pub const fn total_content_bytes(&self) -> u64

Source§

impl Limits<PackageExpansionResource>

Source

pub fn new( compressed_archive_bytes: u64, members: u64, member_name_bytes: u64, member_bytes: u64, total_expanded_bytes: u64, ) -> Self

Constructs a validated set of mandatory finite expansion ceilings.

Source

pub const fn reference_v1() -> Self

The first-party limits for registry package archives.

Source

pub const fn compressed_archive_bytes(&self) -> u64

Source

pub const fn members(&self) -> u64

Source

pub const fn member_name_bytes(&self) -> u64

Source

pub const fn member_bytes(&self) -> u64

Source

pub const fn total_expanded_bytes(&self) -> u64

Trait Implementations§

Source§

impl<R: Clone + Resource> Clone for Limits<R>

Source§

fn clone(&self) -> Limits<R>

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<R: Copy + Resource> Copy for Limits<R>

Source§

impl<R: Resource> Debug for Limits<R>

Source§

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

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

impl<R: Eq + Resource> Eq for Limits<R>

Source§

impl From<Limits<ResourceKind<9>>> for Limits<ResourceKind<8>>

Source§

fn from(limits: ProjectReadLimits) -> Self

Converts to this type from the input type.
Source§

impl From<Limits<ResourceKind<10>>> for Limits<ResourceKind<8>>

Source§

fn from(limits: FontReadLimits) -> Self

Converts to this type from the input type.
Source§

impl From<Limits<ResourceKind<11>>> for Limits<ResourceKind<8>>

Source§

fn from(limits: PackageTreeReadLimits) -> Self

Converts to this type from the input type.
Source§

impl<R: PartialEq + Resource> PartialEq for Limits<R>

Source§

fn eq(&self, other: &Limits<R>) -> bool

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

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

Inequality operator !=. Read more
Source§

impl<R: PartialEq + Resource> StructuralPartialEq for Limits<R>

Auto Trait Implementations§

§

impl<R> Freeze for Limits<R>
where PhantomData<R>: Freeze,

§

impl<R> RefUnwindSafe for Limits<R>

§

impl<R> Send for Limits<R>
where PhantomData<R>: Send,

§

impl<R> Sync for Limits<R>
where PhantomData<R>: Sync,

§

impl<R> Unpin for Limits<R>
where PhantomData<R>: Unpin,

§

impl<R> UnsafeUnpin for Limits<R>

§

impl<R> UnwindSafe for Limits<R>

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where 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) -> D
where M: TransformMatrix<T>,

Convert the source color to the destination color using the specified method.
Source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default.
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, C> ArraysFrom<C> for T
where C: IntoArrays<T>,

Source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
Source§

impl<T, C> ArraysInto<C> for T
where C: FromArrays<T>,

Source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
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<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for U
where T: FromCam16Unclamped<WpParam, U>,

Source§

type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
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, C> ComponentsFrom<C> for T
where C: IntoComponents<T>,

Source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
Source§

impl<T, C> ComponentsInto<C> for T

Source§

fn components_into(self) -> C

Cast this collection of color components into a collection of colors. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> Finish for T

Source§

fn finish(self)

Does nothing but move self, equivalent to drop.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromAngle<T> for T

Source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
Source§

impl<T, U> FromStimulus<U> for T
where U: IntoStimulus<T>,

Source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, rounding and clamping.
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, U> IntoAngle<U> for T
where U: FromAngle<T>,

Source§

fn into_angle(self) -> U

Performs a conversion into T.
Source§

impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for U
where T: Cam16FromUnclamped<WpParam, U>,

Source§

type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T, U> IntoColor<U> for T
where U: FromColor<T>,

Source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
Source§

impl<T, U> IntoColorUnclamped<U> for T
where U: FromColorUnclamped<T>,

Source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
Source§

impl<T> IntoEither for T

Source§

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

impl<T> IntoStimulus<T> for T

Source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, rounding and clamping.
Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T> StrictAs for T

Source§

fn strict_as<Dst>(self) -> Dst
where T: StrictCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> StrictCastFrom<Src> for Dst
where Src: StrictCast<Dst>,

Source§

fn strict_cast_from(src: Src) -> Dst

Casts the value.
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<U, T> ToOwnedObj<U> for T
where U: FromObjRef<T>,

Source§

fn to_owned_obj(&self, data: FontData<'_>) -> U

Convert this type into T, using the provided data to resolve any offsets.
Source§

impl<U, T> ToOwnedTable<U> for T
where U: FromTableRef<T>,

Source§

fn to_owned_table(&self) -> U

Source§

impl<T, C> TryComponentsInto<C> for T
where C: TryFromComponents<T>,

Source§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
Source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of colors. Read more
Source§

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

Source§

type Error = !

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

impl<T, U> TryIntoColor<U> for T
where U: TryFromColor<T>,

Source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
Source§

impl<C, U> UintsFrom<C> for U
where C: IntoUints<U>,

Source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
Source§

impl<C, U> UintsInto<C> for U
where C: FromUints<U>,

Source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.