Skip to content

Stream result deserialization #30

@Iizuki

Description

@Iizuki

Is your feature request related to a problem? Please describe.

Currently the search result Streams return Records which you still have to deserialize into user types by calling Record::to_record.

Something along these lines is always needed:

let deserialized_stream = ldap_stream.map(|record| {
    record.and_then(Record::to_record)
});

Describe the solution you'd like

It would be more ergonomic for the user if the deserialization happened inside the library. The lines above wouldn't have to be used.

Implementation

It should be fairly simple. Just adding the code above to the streaming search functions would do most of the work. Or perhaps it would be more efficient to just do it manually inside the unfold right at the source.

A type parameter for the target type would have to be added though. There might be some nuance here.

I might send a PR eventually myself, but it's probably going to be a while till I have time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions