zvariant

Function to_writer_fds_for_signature

source
pub fn to_writer_fds_for_signature<B, W, T>(
    writer: &mut W,
    ctxt: EncodingContext<B>,
    signature: &Signature<'_>,
    value: &T,
) -> Result<(usize, Vec<RawFd>)>
where B: ByteOrder, W: Write + Seek, T: Serialize + ?Sized,
Expand description

Serialize T that (potentially) contains FDs and has the given signature, to the given writer.

Use this function instead of to_writer_fds if the value being serialized does not implement Type.

This function returns the number of bytes written to the given writer and the file descriptor vector, which needs to be transferred via an out-of-band platform specific mechanism.

This function is not available on Windows.