On this page
Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class · Ruby 4.1
IO::Buffer::Storage
A buffer that manages backing storage, including internally allocated, mapped, String-backed, and borrowed memory. Storage provides Buffer’s byte-access interface together with allocation resizing, free, transfer, and storage-specific predicates. It need not own the bytes it references.
IO::Buffer.new, IO::Buffer.for, and IO::Buffer.map create Storage objects. The Storage object is directly usable as a buffer; no separate view object is needed unless a caller requests a slice. Duplicating Storage copies its bytes into independent storage, unlike duplicating an IO::Buffer::Slice.