xorf
xorf copied to clipboard
`BinaryFuse` filters only implement `TryFrom`, conflicting with `HashProxy`
Attempting to use a HashProxy<String, DefaultHasher, BinaryFuse8>
is impossible in the current state due to HashProxy::from
failing. You can reproduce by replacing Xor8
with BinaryFuse8
in the example.
Output from cargo:
error[E0277]: the trait bound `xorf::BinaryFuse8: std::convert::From<std::vec::Vec<u64>>` is not satisfied
--> src\lib.rs:59:84
|
59 | let pw_filter: HashProxy<String, DefaultHasher, BinaryFuse8> = HashProxy::from(&passwords);
| --------------- ^^^^^^^^^^ the trait `std::convert::From<std::vec::Vec<u64>>` is not implemented for `xorf::BinaryFuse8`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `std::convert::From<T>`:
<xorf::HashProxy<T, H, F> as std::convert::From<&[T]>>
<xorf::HashProxy<T, H, F> as std::convert::From<&std::vec::Vec<T>>>
= note: required for `xorf::HashProxy<std::string::String, std::collections::hash_map::DefaultHasher, xorf::BinaryFuse8>` to implement `std::convert::From<&std::vec::Vec<std::string::String>>`