[−][src]Struct sailfish::runtime::Buffer
Buffer for rendered contents
This struct is quite simular to String
, but some methods are
re-implemented for faster buffering.
Implementations
impl Buffer
[src]
pub const fn new() -> Buffer
[src]
pub fn with_capacity(n: usize) -> Buffer
[src]
pub fn as_str(&self) -> &str
[src]
pub fn len(&self) -> usize
[src]
pub fn capacity(&self) -> usize
[src]
pub unsafe fn set_len(&mut self, new_len: usize)
[src]
Force the length of buffer to new_len
Safety
new_len
must be less than or equal tocapacity()
- The elements at
old_len..new_len
must be initialized
pub fn is_empty(&self) -> bool
[src]
pub fn reserve(&mut self, size: usize)
[src]
pub fn clear(&mut self)
[src]
pub fn into_string(self) -> String
[src]
pub fn write_str(&mut self, data: &str)
[src]
pub fn write_char(&mut self, data: char)
[src]
Trait Implementations
impl<'_> Add<&'_ str> for Buffer
[src]
type Output = Buffer
The resulting type after applying the +
operator.
fn add(self, other: &str) -> Buffer
[src]
impl<'_> AddAssign<&'_ str> for Buffer
[src]
fn add_assign(&mut self, other: &str)
[src]
impl Clone for Buffer
[src]
impl Debug for Buffer
[src]
impl Default for Buffer
[src]
impl Drop for Buffer
[src]
impl<'_> From<&'_ str> for Buffer
[src]
impl From<String> for Buffer
[src]
impl Write for Buffer
[src]
Auto Trait Implementations
impl RefUnwindSafe for Buffer
impl !Send for Buffer
impl !Sync for Buffer
impl Unpin for Buffer
impl UnwindSafe for Buffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,