You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.
When I deserialize my struct from binary with bincode after adding a field to the struct, it cant deserialize the struct, losing my old data (the other struct fields that stayed the same since the last session).
Apparently, this can be fixed by using a different format that includes field names.
I tried yaml but it takes a long time to serialize/deserialize and the file is very large (for my use case).
Out of all the formats that include field names, CBOR (which serde supports) is the one that should be fastest to (de)serialize and should have the lowest file size because it's binary.
Would it be possible to add CBOR support to rustbreak? :)
Btw, my use case is persistence of data of my application and the structs change between sessions, sometimes fields are added/removed and I want to always load as much data as possible from the previous session (using #[serde(default)] on the struct to use Default::default() on a field granularity level to initialize new fields that aren't in the persisted data).
The text was updated successfully, but these errors were encountered:
When I deserialize my struct from binary with bincode after adding a field to the struct, it cant deserialize the struct, losing my old data (the other struct fields that stayed the same since the last session).
Apparently, this can be fixed by using a different format that includes field names.
I tried yaml but it takes a long time to serialize/deserialize and the file is very large (for my use case).
Out of all the formats that include field names, CBOR (which serde supports) is the one that should be fastest to (de)serialize and should have the lowest file size because it's binary.
Would it be possible to add CBOR support to rustbreak? :)
Btw, my use case is persistence of data of my application and the structs change between sessions, sometimes fields are added/removed and I want to always load as much data as possible from the previous session (using
#[serde(default)]
on the struct to useDefault::default()
on a field granularity level to initialize new fields that aren't in the persisted data).The text was updated successfully, but these errors were encountered: