base-scheduler 0.4.0

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

use super::SocketOperation;
use crate::SocketAddress;
use std::io;

/// Inspect the local IP address of a socket.
pub trait SocketLocalAddress: SocketOperation {
    /// Return the local address the socket is bound to.
    fn socket_local_address(&self, socket: &Self::Socket) -> io::Result<SocketAddress>;
}