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
For bitvec in Mongo ops (such as response_flags in OP_REPLY, using them as i32/u32 is cumbersome and error-prone (one needs to use bit manipulation to extract information).
Alternatively, we might as well just parse the initial bytes as struct { fieldA: bool, fieldB: bool } and only handle bitvec logic in seralizer and parser.
I do agree with you, the i32/u32 representation is not a good option, since this field is not representing a i32/u32 number, Bit 0, 1, 16 have their own meaning,
However the BitVec has been removed from standard collections, you can check the PR here. The link above might not be what we want.
I also checked other two crate which allows you interact with bit more easily in Rust:
Those two crates might not be trustable, they either don't have enough maintain resources or they don't have a strong evidence it is a trustable crates.
For bitvec in Mongo ops (such as
response_flags
inOP_REPLY
, using them asi32
/u32
is cumbersome and error-prone (one needs to use bit manipulation to extract information).Rust provides BitVec.
Alternatively, we might as well just parse the initial bytes as
struct { fieldA: bool, fieldB: bool }
and only handle bitvec logic in seralizer and parser.cc @poppindouble
The text was updated successfully, but these errors were encountered: