Module ancillary
Available on crate features
io and ancillary only.Expand description
Ancillary data (control message) support for connected streams.
Ancillary messages are used to pass out-of-band information such as file descriptors (Unix domain sockets), credentials, or kTLS record types.
§Types
AncillaryBuf: A fixed-size, properly aligned stack buffer for ancillary messages.AncillaryBuilder: A builder for constructing ancillary messages into aAncillaryBuf.AncillaryIter: An iterator over a buffer of ancillary messages.AncillaryRef: A reference to a single ancillary data entry.AncillaryData: Trait for types that can be encoded/decoded as ancillary data payloads.CodecError: Error type for encoding/decoding operations.
§Traits
AsyncReadAncillary: read data together with ancillary dataAsyncWriteAncillary: write data together with ancillary data
§Functions
ancillary_space: Helper function to calculate ancillary message size for a type.
§Modules
bytemuck_ext: Extension module for automaticAncillaryDataimplementation via bytemuck (requiresbytemuckfeature).
Modules§
- bytemuck_
ext bytemuck - Extension module for automatic
AncillaryDataimplementation via bytemuck.
Structs§
- Ancillary
Buf - A fixed-size, stack-allocated buffer for ancillary (control) messages.
- Ancillary
Builder - Helper to construct ancillary (control) messages.
- Ancillary
Iter - An iterator for ancillary (control) messages.
- Ancillary
Ref - Reference to an ancillary (control) message.
Enums§
- Codec
Error - Error that can occur when encoding or decoding ancillary data.
Traits§
- Ancillary
Data - Trait for types that can be encoded and decoded as ancillary data payloads.
- Async
Read Ancillary - Trait for asynchronous read with ancillary (control) data. Intended for connected stream sockets (TCP, Unix streams) where no source address is needed.
- Async
Read Ancillary Managed - Trait for asynchronous read with ancillary (control) data that returns managed buffers. Intended for connected stream sockets (TCP, Unix streams) where no source address is needed.
- Async
Read Ancillary Multi - Trait for asynchronous read with ancillary (control) data that returns multiple managed buffers. Intended for connected stream sockets (TCP, Unix streams) where no source address is needed.
- Async
Write Ancillary - Trait for asynchronous write with ancillary (control) data. Intended for connected stream sockets (TCP, Unix streams) where no destination address is needed.
- Async
Write Ancillary Zerocopy - Trait for zerocopy asynchronous write with ancillary (control) data. Intended for connected stream sockets (TCP, Unix streams) where no destination address is needed.
Functions§
- ancillary_
space - Returns the buffer size required to hold one ancillary message carrying a
value of type
T.