Struct resp_protocol::SimpleString [−][src]
pub struct SimpleString(_);
Implementations
Simple string type
Build a new Simple string
Example
use resp_protocol::SimpleString;
let simple_string = SimpleString::new(b"OK");
Build as new Simple String from raw pointer
Example
use resp_protocol::SimpleString;
use std::mem::ManuallyDrop;
let string: String = "+OK\r\n".to_owned();
let mut mdrop_string: ManuallyDrop<String> = ManuallyDrop::new(string);
let simple_string: SimpleString = unsafe { SimpleString::from_raw(mdrop_string.as_mut_ptr(), mdrop_string.len()) };
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for SimpleString
impl Send for SimpleString
impl Sync for SimpleString
impl Unpin for SimpleString
impl UnwindSafe for SimpleString
Blanket Implementations
Mutably borrows from an owned value. Read more