surrealpatch/lib/src/sql/bytes.rs

15 lines
335 B
Rust
Raw Normal View History

use serde::Deserialize;
use serde::Serialize;
#[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Deserialize, Hash)]
pub struct Bytes(pub(super) Vec<u8>);
impl Serialize for Bytes {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
2023-04-29 15:58:22 +00:00
serializer.serialize_bytes(&self.0)
}
}