pub struct RawDocument {
pub path: String,
pub content: String,
pub last_view: Option<String>,
pub view_meta: Option<String>,
pub lossy: bool,
pub encoding: String,
pub mtime_ms: i64,
pub size: i64,
pub source_sha256: Option<String>,
pub stream_token: Option<String>,
}Fields§
§path: String§content: String§last_view: Option<String>§view_meta: Option<String>Per-format view metadata (JSON string) restored from the database by read_document.
lossy: boolTrue only when even the detected encoding could not decode the bytes cleanly (genuinely garbled input): replacement characters were substituted.
encoding: StringThe encoding the content was decoded from. Saving re-encodes to this encoding.
mtime_ms: i64Modified time (ms since epoch) at read time. 0 if the platform does not report it.
size: i64Byte size at read time. With mtime_ms this is the cheap on-disk fingerprint.
source_sha256: Option<String>SHA-256 of text bytes at read time. Save uses it to reject stale in-place writes.
stream_token: Option<String>Opaque token for binary viewer URLs; the renderer never receives the path in that URL.
Trait Implementations§
Source§impl Debug for RawDocument
impl Debug for RawDocument
Auto Trait Implementations§
impl Forget for RawDocument
impl Freeze for RawDocument
impl Move for RawDocument
impl RefUnwindSafe for RawDocument
impl Send for RawDocument
impl Sync for RawDocument
impl Unpin for RawDocument
impl UnsafeUnpin for RawDocument
impl UnwindSafe for RawDocument
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