Skip to content

Redesign MimeType #306

Open
@whyoleg

Description

@whyoleg

Main changes:

  • rename to RSocketMimeType
  • move to root package
  • use nested classes

POC API:

public sealed interface RSocketMimeType {
    public sealed interface WithName : RSocketMimeType {
        public val name: String
    }

    public sealed interface WithIdentifier : RSocketMimeType {
        public val identifier: Byte
    }

    public sealed interface WellKnown : WithIdentifier, WithName

    public companion object {
        public val ApplicationAvro: WellKnown
        public val ApplicationCbor: WellKnown
    }
}

public fun RSocketMimeType(name: String): RSocketMimeType.WithName
public fun RSocketMimeType(identifier: Byte): RSocketMimeType.WithIdentifier

Similar API design should be done to auth and metadata types

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions