Skip to content

Downcasting ProtocolObject #658

Open
@Jasper-Bekkers

Description

@Jasper-Bekkers

I'm currently on the latest commit, trying to create a MTLAllocation from a MTLHeap can I can't figure it out.

Technically a ProtocolObject<dyn MTLHeap>, I seem to hit this problem every so often and need increasingly arcane methods of casting these down. Similar for Retained objects. Both would be extremely welcome to have a cast function that would convert from U to T where U:T.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-objc2Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions