Struct sta::pstring::PString
[−]
[src]
pub struct PString { pub compression: bool, // some fields omitted }
The PointString, a string variant comprised of a Vec
Fields
compression: bool
Methods
impl PString
[src]
pub fn new() -> PString
[src]
Create a new, empty PString.
pub fn from_bytes(codepoints: Vec<u8>) -> PString
[src]
Create a new PString with a Vec of bytes.
pub fn set_bytes(&mut self, codepoints: Vec<u8>)
[src]
Set the bytes of an existing PString.
pub fn set_str(&mut self, string: &'static str)
[src]
Set a existing PString to a str.
pub fn set_string(&mut self, string: String)
[src]
Set a existing PString to a str.
pub fn from_str(string: &'static str) -> PString
[src]
Create a PString from a str pointer.
pub fn from_string(string: String) -> PString
[src]
Create a PString from a String.
pub fn as_bytes(&mut self) -> Vec<u8>
[src]
Get the individual bytes that make up a PString.
pub fn as_bytes_raw(&self) -> Vec<u8>
[src]
Get the individual raw bytes that make up a PString.
pub fn chars(&self) -> Vec<char>
[src]
Get a Vec of all chars in the string.
pub fn compress(&mut self)
[src]
Enable compression.
pub fn decompress(&mut self)
[src]
Disable compression.
pub fn compress_to_bytes(&self) -> Vec<u8>
[src]
Compress a codepoints byte struct.
pub fn decompress_to_bytes(&self) -> Vec<u8>
[src]
Decompress a codepoints byte struct
pub fn autocompress(&mut self)
[src]
Autocompress data if enabled.
Trait Implementations
impl Debug for PString
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for PString
[src]
fn clone(&self) -> PString
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more