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.