pub struct PString {
pub compression: bool,
/* private fields */
}
Expand description
The PointString, a string variant comprised of a Vec
Fields§
§compression: bool
Implementations§
Source§impl PString
impl PString
Sourcepub fn with_capacity(capacity: usize) -> PString
pub fn with_capacity(capacity: usize) -> PString
Create a new PString with a certain preallocated capacity to save reallocations.
Sourcepub fn from_bytes(codepoints: Vec<u8>) -> PString
pub fn from_bytes(codepoints: Vec<u8>) -> PString
Create a new PString with a Vec of bytes.
Sourcepub fn set_string(&mut self, string: String)
pub fn set_string(&mut self, string: String)
Set a existing PString to a str.
Sourcepub fn from_string(string: String) -> PString
pub fn from_string(string: String) -> PString
Create a PString from a String.
Sourcepub fn as_bytes_raw(&self) -> Vec<u8> ⓘ
pub fn as_bytes_raw(&self) -> Vec<u8> ⓘ
Get the individual raw bytes that make up a PString.
Sourcepub fn decompress(&mut self)
pub fn decompress(&mut self)
Disable compression.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PString
impl RefUnwindSafe for PString
impl Send for PString
impl Sync for PString
impl Unpin for PString
impl UnwindSafe for PString
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