base-scheduler 0.1.1

Explicit, runtime-independent scheduler capabilities for protocol libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Released under the MIT License.
// Copyright, 2026, by Samuel Williams.

use crate::{SocketOperation, SocketPacketWriter};
use std::io;

/// Construct sequential packet output bound to this scheduler. Separate reader and writer handles permit concurrent reception and sending; backends can choose their own static writer.
pub trait SocketPacketWriting: SocketOperation {
    fn socket_packet_writer<'scheduler>(
        &'scheduler self,
        socket: &Self::Socket,
    ) -> io::Result<impl SocketPacketWriter + 'scheduler>
    where
        Self: Sized,
        Self::Socket: 'static;
}