fred.rs
fred.rs copied to clipboard
(feat) Streams: "_map" methods to return an Option for empty/null xread response
Hey All, for xread_map and xreadgroup_map, these methods currently return a Result for situations where a stream has no records and you get an empty or NULL response.
I think a pragmatic change here would be to check the Value returned from xread and return None in the event that the Value is null instead of returning an Error result.
It's totally expected/reasonable that a stream will be empty at any point and time and it's important to know when there are no records available for processing vs when an actual error occurs.