pub unsafe fn to_writer_for_signature<W, S, T>(
writer: &mut W,
ctxt: Context,
signature: S,
value: &T,
) -> Result<Written>Expand description
Serialize T that has the given signature, to the given writer.
Use this function instead of to_writer if the value being serialized does not implement
DynamicType.
ยงSafety
On Unix systems, the returned Written instance can contain file descriptors and therefore
the caller is responsible for not dropping the returned Written instance before the
writer. Otherwise, the file descriptors in the Written instance will be closed while
serialized data will still refer to them. Hence why this function is marked unsafe.
On non-Unix systems, the returned Written instance will not contain any file descriptors and
hence is safe to drop.