pub struct RedisCmd(pub Vec<RedisFmt>);
Tuple Fields§
§0: Vec<RedisFmt>
Implementations§
Source§impl RedisCmd
impl RedisCmd
Sourcepub fn into_data(self) -> Vec<Vec<u8>>
pub fn into_data(self) -> Vec<Vec<u8>>
Examples found in repository?
examples/parser.rs (line 9)
3fn main() {
4 use std::fs::File;
5 let mut file = File::open("./rdb/dump.rdb").unwrap();
6 let mut dparser = libnewbee::DefaultRdbParser::default();
7 let parsed = dparser.read_to_cmd(&mut file).unwrap();
8 for cmdline in parsed {
9 let datas = cmdline.into_data();
10 for data in datas.into_iter() {
11 print!("{} ", String::from_utf8_lossy(&data));
12 }
13 println!("");
14 }
15}
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RedisCmd
impl RefUnwindSafe for RedisCmd
impl Send for RedisCmd
impl Sync for RedisCmd
impl Unpin for RedisCmd
impl UnwindSafe for RedisCmd
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