#[non_exhaustive]pub struct ScaleCandidate { /* private fields */ }Expand description
A candidate document supplied to super::prove_scale.
This type deliberately has no mutation method. Its only public constructor,
ScaleCandidate::from_document, wraps the document a format frontend
reloaded from its exact emitted artifact bytes. Reference and calibration
tests use the non-default fixtures feature instead of a production
candidate-building API.
Implementations§
Source§impl ScaleCandidate
impl ScaleCandidate
Sourcepub fn from_document(document: Document) -> Self
pub fn from_document(document: Document) -> Self
Wrap a candidate document that a format frontend reloaded from the
exact artifact bytes it emitted, so it can be handed to
super::prove_scale.
DESIGN.md Appendix D §D.8 assigns “exact source rewriting” to the
format frontend, which necessarily produces candidates this module did
not build: animsmith_gltf’s whole-document linear-unit rewrite
operates on raw glTF JSON and buffer bytes and then reloads the
artifact. Without this constructor that reloaded Document could
never reach super::prove_scale, and the artifact-level proof D.6
requires would have no in-memory layer to sit on top of.
This constructor asserts nothing about document. It does not need
to: super::prove_scale already re-validates both documents it is
given and re-derives every claim from them, so this type carries no
safety obligation that super::prove_scale does not independently
redo.
Sourcepub fn into_document(self) -> Document
pub fn into_document(self) -> Document
Consume this candidate, taking ownership of the document.
Trait Implementations§
Source§impl Clone for ScaleCandidate
impl Clone for ScaleCandidate
Source§fn clone(&self) -> ScaleCandidate
fn clone(&self) -> ScaleCandidate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more