Type Alias StringBuf

Source
pub type StringBuf<Marker> = NewtypeBuf<Marker, String>;

Aliased Type§

pub struct StringBuf<Marker> { /* private fields */ }

Implementations§

Source§

impl<Marker> StringBuf<Marker>

Source

pub fn new() -> Self

Creates a new empty buffer.

Source

pub fn with_capacity(capacity: usize) -> Self

Creates a new empty buffer with at least the specified capacity.

Source

pub fn as_str(&self) -> &str

Returns this buffer as a string slice.

Source

pub fn as_mut_str(&mut self) -> &mut str

Source

pub fn len(&self) -> usize

Returns the length of this buffer.

Source

pub fn is_empty(&self) -> bool

Returns true if this buffer is empty.