pub struct IoHandleData {
pub kind: IoHandleKind,
pub resource: Arc<Mutex<Option<IoResource>>>,
pub path: String,
pub mode: String,
}Expand description
Data for IoHandle variant (Arc-wrapped at the HeapValue level to keep
HeapValue small and to enable cluster #2 marshal FromSlot for Arc<IoHandleData>).
Wraps an OS resource (file, socket, process) in an Arc<Mutex<OptionOption is None after close().
Rust’s Drop closes the underlying resource if not already closed.
Storage: HeapValue::IoHandle(Arc<IoHandleData>). The variant Arc is
the marshal-layer’s typed handle (per cluster #2 option γ in
docs/defections.md 2026-05-06); the inner Arc<Mutex<...>> is the
shared resource lock. Cloning the variant is one atomic op.
Fields§
§kind: IoHandleKind§resource: Arc<Mutex<Option<IoResource>>>§path: String§mode: StringImplementations§
Source§impl IoHandleData
impl IoHandleData
Sourcepub fn new_tcp_stream(stream: TcpStream, addr: String) -> Self
pub fn new_tcp_stream(stream: TcpStream, addr: String) -> Self
Create a new TCP stream handle.
Sourcepub fn new_tcp_listener(listener: TcpListener, addr: String) -> Self
pub fn new_tcp_listener(listener: TcpListener, addr: String) -> Self
Create a new TCP listener handle.
Sourcepub fn new_udp_socket(socket: UdpSocket, addr: String) -> Self
pub fn new_udp_socket(socket: UdpSocket, addr: String) -> Self
Create a new UDP socket handle.
Sourcepub fn new_child_process(child: Child, cmd: String) -> Self
pub fn new_child_process(child: Child, cmd: String) -> Self
Create a handle wrapping a spawned child process.
Sourcepub fn new_pipe_reader(stdout: ChildStdout, label: String) -> Self
pub fn new_pipe_reader(stdout: ChildStdout, label: String) -> Self
Create a handle wrapping a child stdout pipe.
Sourcepub fn new_pipe_writer(stdin: ChildStdin, label: String) -> Self
pub fn new_pipe_writer(stdin: ChildStdin, label: String) -> Self
Create a handle wrapping a child stdin pipe.
Sourcepub fn new_pipe_reader_err(stderr: ChildStderr, label: String) -> Self
pub fn new_pipe_reader_err(stderr: ChildStderr, label: String) -> Self
Create a handle wrapping a child stderr pipe.
Trait Implementations§
Source§impl Clone for IoHandleData
impl Clone for IoHandleData
Source§fn clone(&self) -> IoHandleData
fn clone(&self) -> IoHandleData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more