#[non_exhaustive]pub struct Size {
pub inferences: u64,
pub characters: u64,
pub height: u64,
pub width: u64,
pub exact: bool,
}Expand description
How large the derivation of a proof is, as
Proof::derivation_size computes it without building it.
A count that passes u64::MAX is u64::MAX, meaning more than can be
counted, and exact is then false.
§JSON
With the feature serialize, an object of its fields.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.inferences: u64The inferences of the derivation, exact unless saturated.
characters: u64The characters of every inference’s sequent added up, each sequent
written one-sided with its formulas separated by a comma and a
space. This is what a renderer writes, leaving out its rule names,
its layout and its own spelling of the connectives. Exact when
exact is set, and never less than the true sum otherwise.
height: u64The inferences on the longest branch, exact unless saturated. The text tree has two lines for each.
width: u64The characters of the widest sequent the pass saw. The text tree is at least this wide, so this is a lower bound of its width.
exact: boolWhether every count is exact. False when one saturated, and when
characters is an upper bound because a & has several ?
formulas that only one of its premises uses: the weakenings above
the other premise are then each counted with the sequent of the
last.
Implementations§
Source§impl Size
impl Size
Sourcepub const BYTES_PER_CHARACTER: u64 = 8
pub const BYTES_PER_CHARACTER: u64 = 8
The bytes a derivation takes for every character of its sequents, in memory and in most of its written forms: the occurrence ids of the sequents, the rule lines of the text tree, the markup of the exports.
Sourcepub const BYTES_PER_INFERENCE: u64 = 128
pub const BYTES_PER_INFERENCE: u64 = 128
The bytes a derivation takes for every inference besides its sequent.
Sourcepub fn bytes(&self) -> u64
pub fn bytes(&self) -> u64
Returns an estimate of the bytes the derivation takes to build and to write in any format, good to the order of magnitude.
It counts BYTES_PER_CHARACTER for
each character of a sequent and
BYTES_PER_INFERENCE for each
inference. Limits::derivation_bytes
bounds this number.
Trait Implementations§
impl Copy for Size
Source§impl<'de> Deserialize<'de> for Size
impl<'de> Deserialize<'de> for Size
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Size
impl StructuralPartialEq for Size
Auto Trait Implementations§
impl Forget for Size
impl Freeze for Size
impl Move for Size
impl RefUnwindSafe for Size
impl Send for Size
impl Sync for Size
impl Unpin for Size
impl UnsafeUnpin for Size
impl UnwindSafe for Size
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> 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> Pointable for T
impl<T> Pointable for T
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.