pub struct Vecx<T> where
T: PartialEq + Clone + Serialize + DeserializeOwned + Debug, { /* fields omitted */ }
Expand description
To solve the problem of unlimited memory usage,
use this to replace the original in-memory Vec<_>
.
- Each time the program is started, a new database is created
- Can ONLY be used in append-only scenes like the block storage
Implementations
Imitate the behavior of ‘Vec<_>.get(…)’
Any faster/better choice other than JSON ?
Imitate the behavior of ‘Vec<_>.get_mut(…)’
Imitate the behavior of ‘Vec<_>.insert(idx, value)’,
but we do not return the previous value, like Vecx<_, _>.set_value
.
Trait Implementations
impl<'de, T> Deserialize<'de> for Vecx<T> where
T: PartialEq + Clone + Serialize + DeserializeOwned + Debug,
impl<'de, T> Deserialize<'de> for Vecx<T> where
T: PartialEq + Clone + Serialize + DeserializeOwned + Debug,
Deserialize this value from the given Serde deserializer. Read more
impl<T> StructuralPartialEq for Vecx<T> where
T: PartialEq + Clone + Serialize + DeserializeOwned + Debug,
Auto Trait Implementations
impl<T> RefUnwindSafe for Vecx<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Vecx<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more