Skip to content

DynamicCastFlags

tevelee edited this page Jul 25, 2026 · 1 revision

DynamicCastFlags

Options accepted by Swift's low-level dynamic-cast runtime entry point.

public struct DynamicCastFlags: OptionSet, Sendable 

Echo exposes this ABI representation for inspection and for clients that already manage opaque storage correctly. It intentionally does not wrap swift_dynamicCast: a safe generic wrapper cannot preserve the runtime's copy, take, destruction, and noncopyable-value semantics.

Inheritance

OptionSet, Sendable

Initializers

init(rawValue:)

Creates a dynamic-cast flag set from its ABI representation.

public init(rawValue: UInt) 

Properties

rawValue

The ABI bit representation.

public let rawValue: UInt

unconditional

The cast must not fail.

public static let unconditional 

takeOnSuccess

Transfer the source value into the result if the cast succeeds.

public static let takeOnSuccess 

destroyOnFailure

Destroy the source value if the cast fails.

public static let destroyOnFailure 

prohibitIsolatedConformances

Do not use conformances isolated to an actor or global actor.

public static let prohibitIsolatedConformances 

Swift uses this for casts to constraints such as Sendable, where an isolated conformance must not be treated as generally available.

Types
Protocols
Global Typealiases
Global Variables
Global Functions

Clone this wiki locally