mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-03-15 05:12:00 +08:00
10 lines
214 B
Rust
10 lines
214 B
Rust
|
pub trait WriteToBytes {
|
||
|
fn write_to_bytes(&self, bytes: &mut Vec<u8>);
|
||
|
|
||
|
fn into_bytes(&self) -> Vec<u8> {
|
||
|
let mut bytes = Vec::new();
|
||
|
self.write_to_bytes(&mut bytes);
|
||
|
bytes
|
||
|
}
|
||
|
}
|