Skip to main content

string_identifiable

Function string_identifiable 

Source
pub fn string_identifiable() -> &'static Conformance
Expand description

An Identifiable conformance on Swift.String, with ID == Int.

dragContainer wants an item that is both Transferable and Identifiable. String already has the first and no public SwiftUI type has either, so the second is synthesized onto it — the standard library exports a nominal type descriptor for String like any other type, and a conformance record registered from here is as real as one a Swift module declares.