|
|
@ -18,7 +18,7 @@ fn main() { |
|
|
|
db.put(b"my key", b"my value"); |
|
|
|
db.put(b"my key", b"my value"); |
|
|
|
db.get(b"my key") |
|
|
|
db.get(b"my key") |
|
|
|
.map( |value| { |
|
|
|
.map( |value| { |
|
|
|
println!("retrieved value {}", value.to_utf8().unwrap()), |
|
|
|
println!("retrieved value {}", value.to_utf8().unwrap()) |
|
|
|
}) |
|
|
|
}) |
|
|
|
.on_absent( || { println!("value not found") }) |
|
|
|
.on_absent( || { println!("value not found") }) |
|
|
|
.on_error( |e| { println!("operational problem encountered: {}", e) }); |
|
|
|
.on_error( |e| { println!("operational problem encountered: {}", e) }); |
|
|
|