Skip to main content

base_scheduler/
socket_recv_message_mut.rs

1// Released under the MIT License.
2// Copyright, 2026, by Samuel Williams.
3
4use crate::{IoBufMut, SocketRecvMessage};
5
6/// A completed message with exclusively writable payload storage. Immutable receive implementations need not implement this capability.
7pub trait SocketRecvMessageMut: SocketRecvMessage<Payload: IoBufMut> {
8    /// The same completed range as `payload()`, with exclusive access for parsing or decryption. Changes are visible through subsequent payload access and ownership transfer; metadata is outside this range.
9    fn payload_mut(&mut self) -> &mut [u8];
10}