[−][src]Struct jstring::JavaString
JavaString uses short string optimizations and a lack of a "capacity" field to reduce struct size and heap fragmentation in certain cases.
It allows for mutation, but not for growth without reallocation.
Methods
impl JavaString
[src]
pub const fn new() -> Self
[src]
Creates a new empty JavaString
.
Given that the JavaString
is empty, this will not allocate any initial
buffer.
Examples
Basic usage:
let s = JavaString::new();
pub const fn with_capacity(_len: usize) -> Self
[src]
Creates a new empty JavaString
. Included for API compatibility with standard
String
implementation.
Examples
Basic usage:
let mut s = String::with_capacity(10);
Trait Implementations
impl DerefMut for JavaString
[src]
impl Deref for JavaString
[src]
Auto Trait Implementations
impl Unpin for JavaString
impl !Sync for JavaString
impl !Send for JavaString
impl UnwindSafe for JavaString
impl RefUnwindSafe for JavaString
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,