pub struct CheetahBuilder { /* private fields */ }Expand description
Append-heavy builder for constructing Cheetah string values.
CheetahBuilder keeps mutable construction separate from immutable
clone-cheap CheetahStr values and stable string values.
Implementations§
Source§impl CheetahBuilder
impl CheetahBuilder
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates an empty builder with at least capacity bytes.
Sourcepub fn from_string(value: String) -> Self
pub fn from_string(value: String) -> Self
Creates a builder from existing owned storage.
Sourcepub fn reserve(&mut self, additional: usize)
pub fn reserve(&mut self, additional: usize)
Reserves capacity for at least additional more bytes.
Sourcepub fn finish_string(self) -> CheetahString
pub fn finish_string(self) -> CheetahString
Finishes into a mutable string value, preserving spare capacity when it is useful for subsequent mutation.
Sourcepub fn finish_str(self) -> CheetahStr
pub fn finish_str(self) -> CheetahStr
Finishes into an immutable clone-cheap string value.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Returns the owned String backing this builder.
Trait Implementations§
Source§impl Clone for CheetahBuilder
impl Clone for CheetahBuilder
Source§fn clone(&self) -> CheetahBuilder
fn clone(&self) -> CheetahBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CheetahBuilder
impl Debug for CheetahBuilder
Source§impl Default for CheetahBuilder
impl Default for CheetahBuilder
Source§fn default() -> CheetahBuilder
fn default() -> CheetahBuilder
Returns the “default value” for a type. Read more
Source§impl<'a> Extend<&'a str> for CheetahBuilder
impl<'a> Extend<&'a str> for CheetahBuilder
Source§fn extend<T: IntoIterator<Item = &'a str>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = &'a str>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl Extend<char> for CheetahBuilder
impl Extend<char> for CheetahBuilder
Source§fn extend<T: IntoIterator<Item = char>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = char>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl From<&str> for CheetahBuilder
impl From<&str> for CheetahBuilder
Auto Trait Implementations§
impl Freeze for CheetahBuilder
impl RefUnwindSafe for CheetahBuilder
impl Send for CheetahBuilder
impl Sync for CheetahBuilder
impl Unpin for CheetahBuilder
impl UnsafeUnpin for CheetahBuilder
impl UnwindSafe for CheetahBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more