mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
11 lines
226 B
Rust
11 lines
226 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Deserialize, Serialize)]
|
|
pub struct Data {
|
|
pub id: u32,
|
|
pub data: Vec<u8>,
|
|
}
|
|
|
|
impl Data {
|
|
pub fn len(&self) -> usize { size_of_val(&self.id) + 4 + self.data.len() }
|
|
}
|