This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // WARNING: THIS CODE IS A HACKY PROTOTYPE FOR TOY PURPOSES ONLY. | |
| // CHOOSING TO COPY THIS CODE INTO YOUR RUST PROGRAM IS WILDLY UNSOUND. | |
| // | |
| // ping me (davidhewitt) on the PyO3 issue tracker and we can figure out | |
| // how to do this safely. | |
| use std::collections::{HashMap, hash_map::Iter as MapIter}; | |
| // pyclass 1 | |
| pub struct Class { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #![feature(arbitrary_self_types)] | |
| use pyo3::prelude::*; | |
| use pyo3::pyclass::PyClassShell; | |
| use pyo3::types::{PyBytes, PyTuple}; | |
| use pyo3::ToPyObject; | |
| use bincode::{deserialize, serialize}; | |
| use serde::{Deserialize, Serialize}; | |
| #[derive(Serialize, Deserialize)] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # LVDB - LLOOGG Memory DB | |
| # Copyriht (C) 2009 Salvatore Sanfilippo <[email protected]> | |
| # All Rights Reserved | |
| # TODO | |
| # - cron with cleanup of timedout clients, automatic dump | |
| # - the dump should use array startsearch to write it line by line | |
| # and may just use gets to read element by element and load the whole state. | |
| # - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands. | |
| # - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump! |