Skip to main content

dict_or_stream

Function dict_or_stream 

Source
pub fn dict_or_stream<'a>(
    obj: &Object<'a>,
) -> Option<(Dict<'a>, Option<Stream<'a>>)>
Expand description

A convenience function that extracts a dict and a stream from an object. If the object is just a dictionary, it will return None for the stream. If the object is a stream, it will return its dictionary as well as the stream itself.