DeviceTypeGrants

struct DeviceTypeGrants
extension DeviceTypeGrants : Sendable

The set of device types that the user has granted this application permission to access.

When a user grants permission to a device type, the application gains access to all devices of that type within the structure.

  • Returns true if there are no grants.

    Declaration

    Swift

    var isEmpty: Bool { get }
  • Returns true if all of the requested DeviceTypes are granted.

    Declaration

    Swift

    func contains(all: some Sequence<any DeviceType.Type>) -> Bool
  • Returns true if any of the requested DeviceTypes are granted.

    Declaration

    Swift

    func contains(any: some Sequence<any DeviceType.Type>) -> Bool