2023-04-02 12:24:43 +00:00
|
|
|
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)
|
2023-04-02 12:24:43 +00:00
|
|
|
}
|
|
|
|
}
|