#[non_exhaustive]pub struct DocumentExtension {
pub schema_version: u16,
pub clean_md_sha256: [u8; 32],
pub layout_json_sha256: [u8; 32],
pub report_json_sha256: [u8; 32],
pub preview_png_sha256: Option<[u8; 32]>,
pub page_count: u32,
pub audit_session_id: String,
pub clean_spans: Vec<EmittedTokenSpan>,
pub codec_audit: Vec<CodecAuditRow>,
}Expand description
Signed document-context metadata carried inside a session snapshot envelope.
This extension is the v0.7 bridge for gaze-document: it is safe to serialize
inside the owner-only snapshot envelope, while agent-facing files keep using
non-sensitive mirrors. The single schema_version is bundle-level; sub-files
do not carry independent schema versions.
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.schema_version: u16Bundle-level schema version shared by clean, layout, preview, report, and manifest files.
clean_md_sha256: [u8; 32]SHA-256 of clean.md NFC-normalized bytes.
layout_json_sha256: [u8; 32]SHA-256 of canonical layout.json bytes.
report_json_sha256: [u8; 32]SHA-256 of canonical report.json bytes.
preview_png_sha256: Option<[u8; 32]>SHA-256 of preview-redacted.png bytes when a preview is present.
page_count: u32Page count reported for the source document.
audit_session_id: StringAudit session id mirrored from the writing session for cross-pane correlation.
clean_spans: Vec<EmittedTokenSpan>Signed clean.md byte spans for every emitted token.
codec_audit: Vec<CodecAuditRow>Codec audit rows for the decode path that produced this document extension.
Implementations§
Source§impl DocumentExtension
impl DocumentExtension
Sourcepub fn builder(schema_version: u16) -> DocumentExtensionBuilder
pub fn builder(schema_version: u16) -> DocumentExtensionBuilder
Starts a document extension builder for one bundle schema version.
Trait Implementations§
Source§impl Clone for DocumentExtension
impl Clone for DocumentExtension
Source§fn clone(&self) -> DocumentExtension
fn clone(&self) -> DocumentExtension
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DocumentExtension
impl Debug for DocumentExtension
Source§impl<'de> Deserialize<'de> for DocumentExtension
impl<'de> Deserialize<'de> for DocumentExtension
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>,
Source§impl PartialEq for DocumentExtension
impl PartialEq for DocumentExtension
Source§fn eq(&self, other: &DocumentExtension) -> bool
fn eq(&self, other: &DocumentExtension) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for DocumentExtension
impl Serialize for DocumentExtension
impl StructuralPartialEq for DocumentExtension
Auto Trait Implementations§
impl Freeze for DocumentExtension
impl RefUnwindSafe for DocumentExtension
impl Send for DocumentExtension
impl Sync for DocumentExtension
impl Unpin for DocumentExtension
impl UnsafeUnpin for DocumentExtension
impl UnwindSafe for DocumentExtension
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,
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 more