Merge branch 'master' of git.interhacker.space:corpsmoderne/lazer_rust
This commit is contained in:
commit
f7f5c00d0f
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
target
|
21
examples/simple_client.rs
Normal file
21
examples/simple_client.rs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
use redis::{
|
||||||
|
//RedisResult,
|
||||||
|
Client,
|
||||||
|
Commands,
|
||||||
|
Connection,
|
||||||
|
};
|
||||||
|
|
||||||
|
fn do_something() -> redis::RedisResult<()> {
|
||||||
|
let client = Client::open("redis://127.0.0.1/")?;
|
||||||
|
let mut con: Connection = client.get_connection()?;
|
||||||
|
|
||||||
|
/* do something here */
|
||||||
|
//let val : String = con.get("/pl/0/0")?;
|
||||||
|
let _ = con.set("/pl/0/0", "[(150.0, 230.0, 65280), (170.0, 170.0, 65280), (230.0, 170.0, 65280), (210.0, 230.0, 65280), (150.0, 230.0, 65280)]")?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
do_something();
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user