pub struct SessionExportDto {
pub session_id: String,
pub format: ExportFormat,
pub content: String,
pub byte_len: usize,
pub event_count: usize,
pub generated_at: i64,
}Expand description
ISS-018 — Safe Export 输出 DTO。
不变量:content 来自 events.payload_json(已由 vigil-redaction::redact
在 audit 入库时脱敏)+ events.redacted_text(FTS 摘要)+ 元数据(event_id、
event_type、ts、hash 链);绝不接触从未脱敏的源。渲染层只组装,不引入新文本。
content 按 ExportFormat 编码:Md → Markdown 文本,Html → 完整 HTML 文档
(含 <!DOCTYPE> + 最小 inline CSS)。前端用 Blob + <a download> 触发下载。
Fields§
§session_id: String被导出的 session id
format: ExportFormat输出格式(Md / Html)
content: String渲染后的文本内容
byte_len: usize内容字节长度(UI 显示用)
event_count: usize包含的事件总数
generated_at: i64渲染时戳(Unix epoch 秒)
Trait Implementations§
Source§impl Clone for SessionExportDto
impl Clone for SessionExportDto
Source§fn clone(&self) -> SessionExportDto
fn clone(&self) -> SessionExportDto
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 SessionExportDto
impl Debug for SessionExportDto
Source§impl<'de> Deserialize<'de> for SessionExportDto
impl<'de> Deserialize<'de> for SessionExportDto
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
impl Eq for SessionExportDto
Source§impl PartialEq for SessionExportDto
impl PartialEq for SessionExportDto
Source§fn eq(&self, other: &SessionExportDto) -> bool
fn eq(&self, other: &SessionExportDto) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SessionExportDto
impl Serialize for SessionExportDto
impl StructuralPartialEq for SessionExportDto
Auto Trait Implementations§
impl Freeze for SessionExportDto
impl RefUnwindSafe for SessionExportDto
impl Send for SessionExportDto
impl Sync for SessionExportDto
impl Unpin for SessionExportDto
impl UnsafeUnpin for SessionExportDto
impl UnwindSafe for SessionExportDto
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