Skip to content

Variants of first, single etc. which return Single #3038

Closed
@LalitMaganti

Description

@LalitMaganti

Now that we have the concept of a "Single", I think it would make sense that any operator which returns an observable which is guaranteed to return exactly one item or fail would be a Single. Examples would be operators like single, first, toList, takeFirst, takeLast etc.

I understand that to maintain source and binary compatibility, the existing definitions of these would need to be unchanged so would it be possible to create some sort of conversion mechanism to turn an observable into a Single?

If this would be acceptable I would be happy to try my hand in writing such a conversion mechanism depending on how complex it would have to be. I have been using Rx for a while now but as of yet have not actually written something which interacts with low level Rx stuff (e.g. a custom operator)

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions