Expand description
The Resource trait for I/O handles and other closeable resources.
Resources are ref-counted with Arc (NOT GcPtr) so that they get
deterministic cleanup when the last reference drops. The GC has no
finalizers, so GcPtr would leak file descriptors.
Structs§
- Resource
Handle - A wrapper around
Arc<dyn Resource>that providesCloneandDebug.
Traits§
- Resource
- A closeable, ref-counted resource (file handle, socket, etc.).