DoxigAlpha

ensureTotalCapacity

Function parameters

Parameters

#
self:*@This()
bit_capacity:usize

Functions in this namespace

Functions

#
pushWithStateAssumeCapacity
Standalone function for working with a fixed-size buffer.
peekWithState
Standalone function for working with a fixed-size buffer.
popWithState
Standalone function for working with a fixed-size buffer.

Source

Implementation

#
pub fn ensureTotalCapacity(self: *@This(), bit_capacity: usize) Allocator.Error!void {
    const byte_capacity = (bit_capacity + 7) >> 3;
    try self.bytes.ensureTotalCapacity(byte_capacity);
}