Trait ambient_api::global::serde::Serialize
source · pub trait Serialize {
// Required method
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer;
}
Expand description
A data structure that can be serialized into any data format supported by Serde.
Serde provides Serialize
implementations for many Rust primitive and
standard library types. The complete list is here. All of
these can be serialized using Serde out of the box.
Additionally, Serde provides a procedural macro called serde_derive
to
automatically generate Serialize
implementations for structs and enums in
your program. See the derive section of the manual for how to use this.
In rare cases it may be necessary to implement Serialize
manually for some
type in your program. See the Implementing Serialize
section of the
manual for more about this.
Third-party crates may provide Serialize
implementations for types that
they expose. For example the linked-hash-map
crate provides a
LinkedHashMap<K, V>
type that is serializable by Serde because the crate
provides an implementation of Serialize
for it.
Required Methods§
sourcefn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer.
See the Implementing Serialize
section of the manual for more
information about how to implement this method.
use serde::ser::{Serialize, SerializeStruct, Serializer};
struct Person {
name: String,
age: u8,
phones: Vec<String>,
}
// This is what #[derive(Serialize)] would generate.
impl Serialize for Person {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
let mut s = serializer.serialize_struct("Person", 3)?;
s.serialize_field("name", &self.name)?;
s.serialize_field("age", &self.age)?;
s.serialize_field("phones", &self.phones)?;
s.end()
}
}
Object Safety§
Implementations on Foreign Types§
source§impl Serialize for Color
impl Serialize for Color
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl Serialize for AssetType
impl Serialize for AssetType
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl Serialize for IpAddr
Available on crate feature std
only.
impl Serialize for IpAddr
std
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for SocketAddr
Available on crate feature std
only.
impl Serialize for SocketAddr
std
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for bool
impl Serialize for bool
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for char
impl Serialize for char
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for f32
impl Serialize for f32
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for f64
impl Serialize for f64
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for i8
impl Serialize for i8
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for i16
impl Serialize for i16
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for i32
impl Serialize for i32
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for i64
impl Serialize for i64
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for i128
impl Serialize for i128
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for isize
impl Serialize for isize
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for str
impl Serialize for str
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for u8
impl Serialize for u8
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for u16
impl Serialize for u16
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for u32
impl Serialize for u32
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for u64
impl Serialize for u64
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for u128
impl Serialize for u128
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for ()
impl Serialize for ()
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for usize
impl Serialize for usize
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for Line
impl Serialize for Line
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl Serialize for BuildAsset
impl Serialize for BuildAsset
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl Serialize for ProceduralMaterialHandle
impl Serialize for ProceduralMaterialHandle
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl Serialize for ProceduralMeshHandle
impl Serialize for ProceduralMeshHandle
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl Serialize for ProceduralSamplerHandle
impl Serialize for ProceduralSamplerHandle
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl Serialize for ProceduralTextureHandle
impl Serialize for ProceduralTextureHandle
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl Serialize for CString
Available on crate feature std
, or non-no_core_cstr
and crate feature alloc
only.
impl Serialize for CString
std
, or non-no_core_cstr
and crate feature alloc
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for String
Available on crate features std
or alloc
only.
impl Serialize for String
std
or alloc
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for CStr
Available on crate feature std
or non-no_core_cstr
only.
impl Serialize for CStr
std
or non-no_core_cstr
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for Ipv4Addr
Available on crate feature std
only.
impl Serialize for Ipv4Addr
std
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for Ipv6Addr
Available on crate feature std
only.
impl Serialize for Ipv6Addr
std
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for SocketAddrV4
Available on crate feature std
only.
impl Serialize for SocketAddrV4
std
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for SocketAddrV6
Available on crate feature std
only.
impl Serialize for SocketAddrV6
std
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for NonZeroI8
impl Serialize for NonZeroI8
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for NonZeroI16
impl Serialize for NonZeroI16
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for NonZeroI32
impl Serialize for NonZeroI32
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for NonZeroI64
impl Serialize for NonZeroI64
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for NonZeroI128
impl Serialize for NonZeroI128
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for NonZeroIsize
impl Serialize for NonZeroIsize
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for NonZeroU8
impl Serialize for NonZeroU8
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for NonZeroU16
impl Serialize for NonZeroU16
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for NonZeroU32
impl Serialize for NonZeroU32
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for NonZeroU64
impl Serialize for NonZeroU64
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for NonZeroU128
impl Serialize for NonZeroU128
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for NonZeroUsize
impl Serialize for NonZeroUsize
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for AtomicBool
Available on no_target_has_atomic
or target_has_atomic="8"
only.
impl Serialize for AtomicBool
no_target_has_atomic
or target_has_atomic="8"
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for AtomicI8
Available on no_target_has_atomic
or target_has_atomic="8"
only.
impl Serialize for AtomicI8
no_target_has_atomic
or target_has_atomic="8"
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for AtomicI16
Available on no_target_has_atomic
or target_has_atomic="16"
only.
impl Serialize for AtomicI16
no_target_has_atomic
or target_has_atomic="16"
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for AtomicI32
Available on no_target_has_atomic
or target_has_atomic="32"
only.
impl Serialize for AtomicI32
no_target_has_atomic
or target_has_atomic="32"
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for AtomicI64
Available on no_target_has_atomic
or target_has_atomic="64"
only.
impl Serialize for AtomicI64
no_target_has_atomic
or target_has_atomic="64"
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for AtomicIsize
Available on no_target_has_atomic
or target_has_atomic="ptr"
only.
impl Serialize for AtomicIsize
no_target_has_atomic
or target_has_atomic="ptr"
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for AtomicU8
Available on no_target_has_atomic
or target_has_atomic="8"
only.
impl Serialize for AtomicU8
no_target_has_atomic
or target_has_atomic="8"
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for AtomicU16
Available on no_target_has_atomic
or target_has_atomic="16"
only.
impl Serialize for AtomicU16
no_target_has_atomic
or target_has_atomic="16"
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for AtomicU32
Available on no_target_has_atomic
or target_has_atomic="32"
only.
impl Serialize for AtomicU32
no_target_has_atomic
or target_has_atomic="32"
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for AtomicU64
Available on no_target_has_atomic
or target_has_atomic="64"
only.
impl Serialize for AtomicU64
no_target_has_atomic
or target_has_atomic="64"
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for AtomicUsize
Available on no_target_has_atomic
or target_has_atomic="ptr"
only.
impl Serialize for AtomicUsize
no_target_has_atomic
or target_has_atomic="ptr"
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for Path
Available on crate feature std
only.
impl Serialize for Path
std
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for PathBuf
Available on crate feature std
only.
impl Serialize for PathBuf
std
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl Serialize for SystemTime
Available on crate feature std
only.
impl Serialize for SystemTime
std
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<'a> Serialize for Arguments<'a>
impl<'a> Serialize for Arguments<'a>
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<'a, T> Serialize for Cow<'a, T>
impl<'a, T> Serialize for Cow<'a, T>
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<'a, T> Serialize for &'a T
impl<'a, T> Serialize for &'a T
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<'a, T> Serialize for &'a mut T
impl<'a, T> Serialize for &'a mut T
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<Idx> Serialize for Range<Idx>where
Idx: Serialize,
impl<Idx> Serialize for Range<Idx>where
Idx: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<Idx> Serialize for RangeFrom<Idx>where
Idx: Serialize,
impl<Idx> Serialize for RangeFrom<Idx>where
Idx: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<Idx> Serialize for RangeInclusive<Idx>where
Idx: Serialize,
impl<Idx> Serialize for RangeInclusive<Idx>where
Idx: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<Idx> Serialize for RangeTo<Idx>where
Idx: Serialize,
impl<Idx> Serialize for RangeTo<Idx>where
Idx: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<K, V> Serialize for Slice<K, V>
impl<K, V> Serialize for Slice<K, V>
Serializes a map::Slice
as an ordered sequence.
This behaves like crate::map::serde_seq
for IndexMap
, serializing a sequence
of (key, value)
pairs, rather than as a map that might not preserve order.
fn serialize<T>(
&self,
serializer: T
) -> Result<<T as Serializer>::Ok, <T as Serializer>::Error>where
T: Serializer,
source§impl<K, V> Serialize for BTreeMap<K, V>
impl<K, V> Serialize for BTreeMap<K, V>
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<K, V, H> Serialize for HashMap<K, V, H>
impl<K, V, H> Serialize for HashMap<K, V, H>
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<K, V, S> Serialize for IndexMap<K, V, S>
impl<K, V, S> Serialize for IndexMap<K, V, S>
fn serialize<T>(
&self,
serializer: T
) -> Result<<T as Serializer>::Ok, <T as Serializer>::Error>where
T: Serializer,
source§impl<R, G, T> Serialize for ReentrantMutex<R, G, T>
Available on crate feature serde
only.
impl<R, G, T> Serialize for ReentrantMutex<R, G, T>
serde
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<R, T> Serialize for Mutex<R, T>
Available on crate feature serde
only.
impl<R, T> Serialize for Mutex<R, T>
serde
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<R, T> Serialize for RwLock<R, T>
Available on crate feature serde
only.
impl<R, T> Serialize for RwLock<R, T>
serde
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T0> Serialize for (T0,)where
T0: Serialize,
impl<T0> Serialize for (T0,)where
T0: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T0, T1> Serialize for (T0, T1)
impl<T0, T1> Serialize for (T0, T1)
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T0, T1, T2> Serialize for (T0, T1, T2)
impl<T0, T1, T2> Serialize for (T0, T1, T2)
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T0, T1, T2, T3> Serialize for (T0, T1, T2, T3)
impl<T0, T1, T2, T3> Serialize for (T0, T1, T2, T3)
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T0, T1, T2, T3, T4> Serialize for (T0, T1, T2, T3, T4)
impl<T0, T1, T2, T3, T4> Serialize for (T0, T1, T2, T3, T4)
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T0, T1, T2, T3, T4, T5> Serialize for (T0, T1, T2, T3, T4, T5)
impl<T0, T1, T2, T3, T4, T5> Serialize for (T0, T1, T2, T3, T4, T5)
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T0, T1, T2, T3, T4, T5, T6> Serialize for (T0, T1, T2, T3, T4, T5, T6)
impl<T0, T1, T2, T3, T4, T5, T6> Serialize for (T0, T1, T2, T3, T4, T5, T6)
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T0, T1, T2, T3, T4, T5, T6, T7> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7)
impl<T0, T1, T2, T3, T4, T5, T6, T7> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7)
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Serialize for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for Bound<T>where
T: Serialize,
impl<T> Serialize for Bound<T>where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for Option<T>where
T: Serialize,
impl<T> Serialize for Option<T>where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 0]
impl<T> Serialize for [T; 0]
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 1]where
T: Serialize,
impl<T> Serialize for [T; 1]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 2]where
T: Serialize,
impl<T> Serialize for [T; 2]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 3]where
T: Serialize,
impl<T> Serialize for [T; 3]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 4]where
T: Serialize,
impl<T> Serialize for [T; 4]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 5]where
T: Serialize,
impl<T> Serialize for [T; 5]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 6]where
T: Serialize,
impl<T> Serialize for [T; 6]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 7]where
T: Serialize,
impl<T> Serialize for [T; 7]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 8]where
T: Serialize,
impl<T> Serialize for [T; 8]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 9]where
T: Serialize,
impl<T> Serialize for [T; 9]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 10]where
T: Serialize,
impl<T> Serialize for [T; 10]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 11]where
T: Serialize,
impl<T> Serialize for [T; 11]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 12]where
T: Serialize,
impl<T> Serialize for [T; 12]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 13]where
T: Serialize,
impl<T> Serialize for [T; 13]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 14]where
T: Serialize,
impl<T> Serialize for [T; 14]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 15]where
T: Serialize,
impl<T> Serialize for [T; 15]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 16]where
T: Serialize,
impl<T> Serialize for [T; 16]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 17]where
T: Serialize,
impl<T> Serialize for [T; 17]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 18]where
T: Serialize,
impl<T> Serialize for [T; 18]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 19]where
T: Serialize,
impl<T> Serialize for [T; 19]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 20]where
T: Serialize,
impl<T> Serialize for [T; 20]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 21]where
T: Serialize,
impl<T> Serialize for [T; 21]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 22]where
T: Serialize,
impl<T> Serialize for [T; 22]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 23]where
T: Serialize,
impl<T> Serialize for [T; 23]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 24]where
T: Serialize,
impl<T> Serialize for [T; 24]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 25]where
T: Serialize,
impl<T> Serialize for [T; 25]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 26]where
T: Serialize,
impl<T> Serialize for [T; 26]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 27]where
T: Serialize,
impl<T> Serialize for [T; 27]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 28]where
T: Serialize,
impl<T> Serialize for [T; 28]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 29]where
T: Serialize,
impl<T> Serialize for [T; 29]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 30]where
T: Serialize,
impl<T> Serialize for [T; 30]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 31]where
T: Serialize,
impl<T> Serialize for [T; 31]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T; 32]where
T: Serialize,
impl<T> Serialize for [T; 32]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for [T]where
T: Serialize,
impl<T> Serialize for [T]where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for Slice<T>where
T: Serialize,
impl<T> Serialize for Slice<T>where
T: Serialize,
Serializes a set::Slice
as an ordered sequence.
fn serialize<Se>(
&self,
serializer: Se
) -> Result<<Se as Serializer>::Ok, <Se as Serializer>::Error>where
Se: Serializer,
source§impl<T> Serialize for Box<T>
impl<T> Serialize for Box<T>
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for BinaryHeap<T>where
T: Serialize,
impl<T> Serialize for BinaryHeap<T>where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for BTreeSet<T>where
T: Serialize,
impl<T> Serialize for BTreeSet<T>where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for LinkedList<T>where
T: Serialize,
impl<T> Serialize for LinkedList<T>where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for VecDeque<T>where
T: Serialize,
impl<T> Serialize for VecDeque<T>where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for Rc<T>
impl<T> Serialize for Rc<T>
This impl requires the "rc"
Cargo feature of Serde.
Serializing a data structure containing Rc
will serialize a copy of
the contents of the Rc
each time the Rc
is referenced within the
data structure. Serialization will not attempt to deduplicate these
repeated data.
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for Weak<T>
Available on crate feature rc
and (crate features std
or alloc
) only.
impl<T> Serialize for Weak<T>
rc
and (crate features std
or alloc
) only.This impl requires the "rc"
Cargo feature of Serde.
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for Arc<T>
impl<T> Serialize for Arc<T>
This impl requires the "rc"
Cargo feature of Serde.
Serializing a data structure containing Arc
will serialize a copy of
the contents of the Arc
each time the Arc
is referenced within the
data structure. Serialization will not attempt to deduplicate these
repeated data.
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for Weak<T>
Available on crate feature rc
and (crate features std
or alloc
) only.
impl<T> Serialize for Weak<T>
rc
and (crate features std
or alloc
) only.This impl requires the "rc"
Cargo feature of Serde.
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for Vec<T>where
T: Serialize,
impl<T> Serialize for Vec<T>where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for Cell<T>
impl<T> Serialize for Cell<T>
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for RefCell<T>
impl<T> Serialize for RefCell<T>
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for Reverse<T>where
T: Serialize,
impl<T> Serialize for Reverse<T>where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for PhantomData<T>where
T: ?Sized,
impl<T> Serialize for PhantomData<T>where
T: ?Sized,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for Wrapping<T>where
T: Serialize,
impl<T> Serialize for Wrapping<T>where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for Mutex<T>
Available on crate feature std
only.
impl<T> Serialize for Mutex<T>
std
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T> Serialize for RwLock<T>
Available on crate feature std
only.
impl<T> Serialize for RwLock<T>
std
only.fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T, E> Serialize for Result<T, E>
impl<T, E> Serialize for Result<T, E>
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T, H> Serialize for HashSet<T, H>where
T: Serialize,
impl<T, H> Serialize for HashSet<T, H>where
T: Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
source§impl<T, S> Serialize for IndexSet<T, S>
impl<T, S> Serialize for IndexSet<T, S>
fn serialize<Se>(
&self,
serializer: Se
) -> Result<<Se as Serializer>::Ok, <Se as Serializer>::Error>where
Se: Serializer,
Implementors§
impl Serialize for Align
impl Serialize for Docking
impl Serialize for Fit
impl Serialize for Layout
impl Serialize for Orientation
impl Serialize for PackageContent
impl Serialize for FontStyle
impl Serialize for HttpMethod
impl Serialize for ComponentOptionValue
impl Serialize for ComponentValue
impl Serialize for ComponentVecValue
impl Serialize for CursorIcon
impl Serialize for MouseButton
impl Serialize for VirtualKeyCode
impl Serialize for EulerRot
impl Serialize for Camera
impl Serialize for CameraOptional
impl Serialize for OrthographicCamera
impl Serialize for OrthographicCameraOptional
impl Serialize for PerspectiveCamera
impl Serialize for PerspectiveCameraOptional
impl Serialize for PerspectiveCommonCamera
impl Serialize for PerspectiveCommonCameraOptional
impl Serialize for PerspectiveInfiniteReverseCamera
impl Serialize for PerspectiveInfiniteReverseCameraOptional
impl Serialize for Package
impl Serialize for PackageOptional
impl Serialize for CharacterController
impl Serialize for Capsule
impl Serialize for Sphere
impl Serialize for Torus
impl Serialize for Transformable
impl Serialize for TransformableOptional
impl Serialize for Module
impl Serialize for ModuleOptional
impl Serialize for Entity
impl Serialize for EditableDuration
impl Serialize for BVec2
impl Serialize for BVec3
impl Serialize for BVec3A
scalar-math
only.impl Serialize for BVec4
impl Serialize for BVec4A
scalar-math
only.