pub struct Limits<R: Resource> { /* private fields */ }Expand description
Validated finite ceilings for the resources used by one operation.
Implementations§
Source§impl Limits<CompilationResource>
impl Limits<CompilationResource>
Sourcepub 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
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.
Sourcepub const fn reference_v1() -> Self
pub const fn reference_v1() -> Self
The first-party bounded compilation export profile.
Sourcepub fn with_export_workers(self, export_workers: u64) -> Self
pub fn with_export_workers(self, export_workers: u64) -> Self
Replaces the export-worker ceiling while preserving every other limit.
pub const fn source_pages(&self) -> u64
pub const fn artifacts(&self) -> u64
pub const fn pixels_per_artifact(&self) -> u64
pub const fn total_pixels(&self) -> u64
pub const fn artifact_bytes(&self) -> u64
pub const fn retained_artifact_bytes(&self) -> u64
pub const fn export_workers(&self) -> u64
Source§impl Limits<FilesystemFontResource>
impl Limits<FilesystemFontResource>
Sourcepub fn new(
visited_entries: u64,
accepted_containers: u64,
container_bytes: u64,
total_accepted_bytes: u64,
) -> Self
pub fn new( visited_entries: u64, accepted_containers: u64, container_bytes: u64, total_accepted_bytes: u64, ) -> Self
Constructs validated mandatory finite reading ceilings.
Sourcepub const fn reference_v1() -> Self
pub const fn reference_v1() -> Self
The first-party limits for filesystem font sources.
pub const fn visited_entries(&self) -> u64
pub const fn accepted_containers(&self) -> u64
pub const fn container_bytes(&self) -> u64
pub const fn total_accepted_bytes(&self) -> u64
Source§impl Limits<FilesystemPackageResource>
impl Limits<FilesystemPackageResource>
pub fn new( visited_entries: u64, selected_files: u64, selected_file_bytes: u64, package_tree_bytes: u64, ) -> Self
Sourcepub const fn reference_v1() -> Self
pub const fn reference_v1() -> Self
The first-party limits for package trees read from filesystems.
pub const fn visited_entries(&self) -> u64
pub const fn selected_files(&self) -> u64
pub const fn selected_file_bytes(&self) -> u64
pub const fn package_tree_bytes(&self) -> u64
Source§impl Limits<FilesystemProjectResource>
impl Limits<FilesystemProjectResource>
Sourcepub fn new(
visited_entries: u64,
selected_files: u64,
root_policy_bytes: u64,
selected_file_bytes: u64,
total_selected_bytes: u64,
) -> Self
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.
Sourcepub const fn reference_v1() -> Self
pub const fn reference_v1() -> Self
The first-party limits for filesystem projects.
pub const fn visited_entries(&self) -> u64
pub const fn selected_files(&self) -> u64
pub const fn root_policy_bytes(&self) -> u64
pub const fn selected_file_bytes(&self) -> u64
pub const fn total_selected_bytes(&self) -> u64
Source§impl Limits<PackageTreeReadResource>
impl Limits<PackageTreeReadResource>
Sourcepub fn new(ceilings: PackageTreeReadCeilings) -> Self
pub fn new(ceilings: PackageTreeReadCeilings) -> Self
Validates every named Package Tree Read ceiling.
Sourcepub const fn reference_v1() -> Self
pub const fn reference_v1() -> Self
The validated first-party version-1 limits.
Sourcepub const fn listed_entries(&self) -> u64
pub const fn listed_entries(&self) -> u64
The maximum number of entries yielded across attempted tree sources.
Sourcepub const fn listed_path_bytes(&self) -> u64
pub const fn listed_path_bytes(&self) -> u64
The maximum byte length of one yielded operation path.
Sourcepub const fn total_listed_path_bytes(&self) -> u64
pub const fn total_listed_path_bytes(&self) -> u64
The maximum retained bytes for paths and structural evidence.
Sourcepub const fn selected_files(&self) -> u64
pub const fn selected_files(&self) -> u64
The maximum selected file count.
Sourcepub const fn object_bytes(&self) -> u64
pub const fn object_bytes(&self) -> u64
The maximum exact bytes retained for one selected file.
Sourcepub const fn total_bytes(&self) -> u64
pub const fn total_bytes(&self) -> u64
The maximum exact bytes retained for the selected Package Tree.
Source§impl Limits<PackageArchiveReadResource>
impl Limits<PackageArchiveReadResource>
Sourcepub fn new(ceilings: PackageArchiveReadCeilings) -> Self
pub fn new(ceilings: PackageArchiveReadCeilings) -> Self
Validates the named raw archive ceiling.
Sourcepub const fn reference_v1() -> Self
pub const fn reference_v1() -> Self
The validated first-party version-1 limits.
Sourcepub const fn archive_bytes(&self) -> u64
pub const fn archive_bytes(&self) -> u64
The maximum exact raw archive bytes retained from one candidate.
Source§impl Limits<PackageReadResource>
impl Limits<PackageReadResource>
Sourcepub fn new(ceilings: PackageReadCeilings) -> Self
pub fn new(ceilings: PackageReadCeilings) -> Self
Validates both Package Read limit families.
Sourcepub const fn trees(&self) -> PackageTreeReadLimits
pub const fn trees(&self) -> PackageTreeReadLimits
Limits shared across ordered Package Tree candidates.
Sourcepub const fn archives(&self) -> PackageArchiveReadLimits
pub const fn archives(&self) -> PackageArchiveReadLimits
Limits applied independently to cache and registry candidates.
Sourcepub const fn reference_v1() -> Self
pub const fn reference_v1() -> Self
The validated first-party version-1 composite limits.
Source§impl Limits<ProjectReadResource>
impl Limits<ProjectReadResource>
Sourcepub fn new(ceilings: ProjectReadCeilings) -> Self
pub fn new(ceilings: ProjectReadCeilings) -> Self
Validates all named read ceilings.
Sourcepub const fn reference_v1() -> Self
pub const fn reference_v1() -> Self
The validated first-party version-1 Project Read limits.
pub const fn listed_entries(&self) -> u64
pub const fn listed_path_bytes(&self) -> u64
pub const fn total_listed_path_bytes(&self) -> u64
pub const fn selected_files(&self) -> u64
pub const fn object_bytes(&self) -> u64
pub const fn total_bytes(&self) -> u64
Source§impl Limits<FontReadResource>
impl Limits<FontReadResource>
Sourcepub fn new(ceilings: FontReadCeilings) -> Self
pub fn new(ceilings: FontReadCeilings) -> Self
Validates all named read ceilings.
Sourcepub const fn reference_v1() -> Self
pub const fn reference_v1() -> Self
The validated first-party version-1 Font Read limits.
pub const fn listed_entries(&self) -> u64
pub const fn listed_path_bytes(&self) -> u64
pub const fn total_listed_path_bytes(&self) -> u64
pub const fn selected_containers(&self) -> u64
pub const fn container_bytes(&self) -> u64
pub const fn total_bytes(&self) -> u64
Source§impl Limits<ReadResource>
impl Limits<ReadResource>
Sourcepub const fn reference_v1() -> Self
pub const fn reference_v1() -> Self
The first-party read limit for version-1 Pack Archives.
pub const fn archive_bytes(&self) -> u64
Source§impl Limits<EncodeResource>
impl Limits<EncodeResource>
Sourcepub fn new(
archive_bytes: u64,
members: u64,
generated_member_name_bytes: u64,
manifest_bytes: u64,
member_bytes: u64,
total_content_bytes: u64,
) -> Self
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.
Sourcepub const fn reference_v1() -> Self
pub const fn reference_v1() -> Self
The first-party limits for version-1 Pack Archives.
pub const fn archive_bytes(&self) -> u64
pub const fn members(&self) -> u64
pub const fn generated_member_name_bytes(&self) -> u64
pub const fn manifest_bytes(&self) -> u64
pub const fn member_bytes(&self) -> u64
pub const fn total_content_bytes(&self) -> u64
Source§impl Limits<DecodeResource>
impl Limits<DecodeResource>
Sourcepub fn new(
archive_bytes: u64,
members: u64,
raw_member_name_bytes: u64,
manifest_bytes: u64,
member_bytes: u64,
total_content_bytes: u64,
) -> Self
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.
Sourcepub const fn reference_v1() -> Self
pub const fn reference_v1() -> Self
The first-party limits for version-1 Pack Archives.
pub const fn archive_bytes(&self) -> u64
pub const fn members(&self) -> u64
pub const fn raw_member_name_bytes(&self) -> u64
pub const fn manifest_bytes(&self) -> u64
pub const fn member_bytes(&self) -> u64
pub const fn total_content_bytes(&self) -> u64
Source§impl Limits<PackageExpansionResource>
impl Limits<PackageExpansionResource>
Sourcepub fn new(
compressed_archive_bytes: u64,
members: u64,
member_name_bytes: u64,
member_bytes: u64,
total_expanded_bytes: u64,
) -> Self
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.
Sourcepub const fn reference_v1() -> Self
pub const fn reference_v1() -> Self
The first-party limits for registry package archives.
pub const fn compressed_archive_bytes(&self) -> u64
pub const fn members(&self) -> u64
pub const fn member_name_bytes(&self) -> u64
pub const fn member_bytes(&self) -> u64
pub const fn total_expanded_bytes(&self) -> u64
Trait Implementations§
impl<R: Copy + Resource> Copy for Limits<R>
impl<R: Eq + Resource> Eq for Limits<R>
Source§impl From<Limits<ResourceKind<9>>> for Limits<ResourceKind<8>>
impl From<Limits<ResourceKind<9>>> for Limits<ResourceKind<8>>
Source§fn from(limits: ProjectReadLimits) -> Self
fn from(limits: ProjectReadLimits) -> Self
Source§impl From<Limits<ResourceKind<10>>> for Limits<ResourceKind<8>>
impl From<Limits<ResourceKind<10>>> for Limits<ResourceKind<8>>
Source§fn from(limits: FontReadLimits) -> Self
fn from(limits: FontReadLimits) -> Self
Source§impl From<Limits<ResourceKind<11>>> for Limits<ResourceKind<8>>
impl From<Limits<ResourceKind<11>>> for Limits<ResourceKind<8>>
Source§fn from(limits: PackageTreeReadLimits) -> Self
fn from(limits: PackageTreeReadLimits) -> Self
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>where
PhantomData<R>: RefUnwindSafe,
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>where
PhantomData<R>: UnsafeUnpin,
impl<R> UnwindSafe for Limits<R>where
PhantomData<R>: UnwindSafe,
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>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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, 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.impl<T> MaybeSend for Twhere
T: Send,
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
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