Trait serde_bytes::Serialize

source ·
pub trait Serialize {
    // Required method
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
       where S: Serializer;
}
Expand description

Types that can be serialized via #[serde(with = "serde_bytes")].

Required Methods§

source

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Serialize for Vec<u8>

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

impl Serialize for [u8]

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

impl<'a> Serialize for Cow<'a, Bytes>

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

impl<'a> Serialize for Cow<'a, [u8]>

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

impl<'a, T> Serialize for &'a T
where T: ?Sized + Serialize,

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

impl<T> Serialize for Option<T>
where T: Serialize,

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

impl<T> Serialize for Box<T>
where T: ?Sized + Serialize,

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

source§

impl<const N: usize> Serialize for [u8; N]

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Implementors§