pub struct XmlSerializer { /* private fields */ }
Trait Implementations§
Source§impl Debug for XmlSerializer
impl Debug for XmlSerializer
Source§impl Default for XmlSerializer
impl Default for XmlSerializer
Source§impl SerializeFlags for &mut XmlSerializer
impl SerializeFlags for &mut XmlSerializer
Source§impl SerializeSeq for &mut XmlSerializer
impl SerializeSeq for &mut XmlSerializer
Source§fn serialize_primitive_element<T>(
&mut self,
value: &T,
index: usize,
len: usize,
) -> Result<(), Self::Error>
fn serialize_primitive_element<T>( &mut self, value: &T, index: usize, len: usize, ) -> Result<(), Self::Error>
§Expected XML Examples
hkArray<hkInt8>
(same as ptr, hkReal, etc…)
<hkparam name="key" numelements="20">
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
16 17 18 19 20
</hkparam>
Source§fn serialize_cstring_element(&mut self, value: &CString<'_>) -> Result<()>
fn serialize_cstring_element(&mut self, value: &CString<'_>) -> Result<()>
§XML Examples
<hkcstring>CString</hkcstring>
Source§fn serialize_stringptr_element(&mut self, value: &StringPtr<'_>) -> Result<()>
fn serialize_stringptr_element(&mut self, value: &StringPtr<'_>) -> Result<()>
§XML Examples
<hkcstring>StringPtr</hkcstring>
Source§fn serialize_class_element<T>(&mut self, value: &T) -> Result<()>
fn serialize_class_element<T>(&mut self, value: &T) -> Result<()>
Serialize a Havok Class sequence element.(e.g.
T: impl HavokClass
)Source§impl SerializeStruct for &mut XmlSerializer
impl SerializeStruct for &mut XmlSerializer
Source§fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()>
fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<()>
§XML Examples
<hkparam name="key1">value</hkparam>
Source§fn serialize_array_field<V, T>(
&mut self,
key: &'static str,
value: V,
_size: TypeSize,
) -> Result<()>
fn serialize_array_field<V, T>( &mut self, key: &'static str, value: V, _size: TypeSize, ) -> Result<()>
§XML Examples
hkArray<hkInt8>
(same as ptr, hkReal, etc…)
<hkparam name="key" numelements="20">
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
16 17 18 19 20
</hkparam>
hkArray<hkStringPtr>
<hkparam name="key" numelements="3">
<hkcstring>StringPtr1</hkcstring>
<hkcstring>StringPtr2</hkcstring>
<hkcstring>StringPtr3</hkcstring>
</hkparam>
hkArray<Vector4>
<hkparam name="key" numelements="2">
(0.000000 0.000000 0.000000 0.000000)
(0.000000 0.000000 0.000000 0.000000)
</hkparam>
Source§fn skip_field<T>(&mut self, key: &'static str, _: &T) -> Result<()>
fn skip_field<T>(&mut self, key: &'static str, _: &T) -> Result<()>
§XML Examples
<!-- key SERIALIZE_IGNORED --><!-- This is skip_field -->
<hkparam name="otherKey"></hkparam>
Source§fn serialize_fixed_array_field<V, T>(
&mut self,
key: &'static str,
value: V,
size: TypeSize,
) -> Result<(), Self::Error>
fn serialize_fixed_array_field<V, T>( &mut self, key: &'static str, value: V, size: TypeSize, ) -> Result<(), Self::Error>
Serialize a struct field for fixed array. Read more
Source§fn pad_field<T>(
&mut self,
x86_pads: &T,
x64_pads: &T,
) -> Result<(), Self::Error>
fn pad_field<T>( &mut self, x86_pads: &T, x64_pads: &T, ) -> Result<(), Self::Error>
Processing for padding to serialize binary data Read more
Source§impl Serializer for &mut XmlSerializer
impl Serializer for &mut XmlSerializer
Source§fn serialize_struct(
self,
name: &'static str,
class_meta: Option<(Pointer, Signature)>,
_sizes: (u64, u64),
) -> Result<Self::SerializeStruct>
fn serialize_struct( self, name: &'static str, class_meta: Option<(Pointer, Signature)>, _sizes: (u64, u64), ) -> Result<Self::SerializeStruct>
Create an XML string like the following
<hkobject name="#0010" class="hkbProjectData" signature="0x13a39ba7">
<!-- memSizeAndFlags SERIALIZE_IGNORED -->
<!-- referenceCount SERIALIZE_IGNORED -->
<hkparam name="worldUpWS">(0.000000 0.000000 1.000000 0.000000)</hkparam>
<hkparam name="stringData">#0009</hkparam>
<hkparam name="defaultEventMode">EVENT_MODE_IGNORE_FROM_GENERATOR</hkparam>
</hkobject>
Source§type Ok = ()
type Ok = ()
The output type produced by this
Serializer
during successful
serialization. Most serializers that produce text or binary output
should set Ok = ()
and serialize into an io::Write
or buffer
contained within the Serializer
instance. Serializers that build
in-memory data structures may be simplified by using Ok
to propagate
the data structure around.Source§type SerializeSeq = &mut XmlSerializer
type SerializeSeq = &mut XmlSerializer
Type returned from
serialize_seq
for serializing the content of the
sequence.Source§type SerializeStruct = &mut XmlSerializer
type SerializeStruct = &mut XmlSerializer
Source§type SerializeFlags = &mut XmlSerializer
type SerializeFlags = &mut XmlSerializer
Type returned from
serialize_enum_flags
for serializing the
content of the struct variant.Source§fn serialize_quaternion(self, v: &Quaternion) -> Result<Self::Ok>
fn serialize_quaternion(self, v: &Quaternion) -> Result<Self::Ok>
Serialize an
Quaternion
value.Source§fn serialize_qstransform(self, v: &QsTransform) -> Result<Self::Ok>
fn serialize_qstransform(self, v: &QsTransform) -> Result<Self::Ok>
Serialize an
QsTransform
value.Source§fn serialize_array(self, _len: Option<usize>) -> Result<Self::SerializeSeq>
fn serialize_array(self, _len: Option<usize>) -> Result<Self::SerializeSeq>
Serialize an
Array
value.Source§fn serialize_ulong(self, v: Ulong) -> Result<Self::Ok>
fn serialize_ulong(self, v: Ulong) -> Result<Self::Ok>
Serialize an
ULong
(pointer size(u32 or u64)) value.Source§fn serialize_enum_flags(self) -> Result<Self::SerializeFlags>
fn serialize_enum_flags(self) -> Result<Self::SerializeFlags>
Serialize an
enum
or Flags
value.Auto Trait Implementations§
impl Freeze for XmlSerializer
impl RefUnwindSafe for XmlSerializer
impl Send for XmlSerializer
impl Sync for XmlSerializer
impl Unpin for XmlSerializer
impl UnwindSafe for XmlSerializer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more