pub struct PrintLayoutResult {
pub contract_version: u16,
pub pages: Vec<PageLayout>,
}Expand description
Deterministic page/system geometry for a score.
Fields§
§contract_version: u16§pages: Vec<PageLayout>Implementations§
Source§impl PrintLayoutResult
impl PrintLayoutResult
Sourcepub fn validate(&self) -> Result<(), PrintLayoutError>
pub fn validate(&self) -> Result<(), PrintLayoutError>
Validate page and system addresses before consuming a serialized layout.
Layouts produced by compute_print_layout satisfy this contract. The explicit
validation is useful for hosts that persist or transport PrintLayoutResult values.
Sourcepub fn page(&self, address: PageAddress) -> Option<&PageLayout>
pub fn page(&self, address: PageAddress) -> Option<&PageLayout>
Retrieve one page artifact by its stable address without recomputing layout.
Sourcepub fn export_page_artifacts(
&self,
) -> Result<Vec<PageArtifact>, PrintLayoutError>
pub fn export_page_artifacts( &self, ) -> Result<Vec<PageArtifact>, PrintLayoutError>
Export validated page descriptors for host renderers and archival backends.
The returned vector preserves physical page order. No filesystem, PDF backend, font loader, or renderer-specific object is involved; hosts can serialize or render each descriptor independently. Validation happens before any descriptor is returned.
Trait Implementations§
Source§impl Clone for PrintLayoutResult
impl Clone for PrintLayoutResult
Source§fn clone(&self) -> PrintLayoutResult
fn clone(&self) -> PrintLayoutResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrintLayoutResult
impl Debug for PrintLayoutResult
Source§impl<'de> Deserialize<'de> for PrintLayoutResult
impl<'de> Deserialize<'de> for PrintLayoutResult
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PrintLayoutResult
impl PartialEq for PrintLayoutResult
Source§impl Serialize for PrintLayoutResult
impl Serialize for PrintLayoutResult
impl StructuralPartialEq for PrintLayoutResult
Auto Trait Implementations§
impl Freeze for PrintLayoutResult
impl RefUnwindSafe for PrintLayoutResult
impl Send for PrintLayoutResult
impl Sync for PrintLayoutResult
impl Unpin for PrintLayoutResult
impl UnsafeUnpin for PrintLayoutResult
impl UnwindSafe for PrintLayoutResult
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
Mutably borrows from an owned value. Read more