Open danobi opened 4 years ago
The query API is iterator based. Each iteration is technically fallible but there's no great way to report errors.
I played around with making the iterator type by Result<T> but that can cause infinite loops: 24aa7ea561e06dd2a .
Result<T>
Not sure what can be done about it. Maybe https://docs.rs/fallible-iterator/0.2.0/fallible_iterator/ but that library isn't very nice b/c it reimplements much of the iterator standard library helpers.
How do your proposed changes cause an infinite loop? Shouldn't we stop when bpf_obj_get_next_id returns a non-zero value?
bpf_obj_get_next_id
The query API is iterator based. Each iteration is technically fallible but there's no great way to report errors.
I played around with making the iterator type by
Result<T>
but that can cause infinite loops: 24aa7ea561e06dd2a .Not sure what can be done about it. Maybe https://docs.rs/fallible-iterator/0.2.0/fallible_iterator/ but that library isn't very nice b/c it reimplements much of the iterator standard library helpers.