pub trait IntoHashable<'a> {
// Required method
fn into_hashable(self) -> HashableValue<'a>;
}Expand description
Anything that can stand where SwiftUI wants some Hashable.
So that .id(7) and .id("row") are what a caller writes, rather than
.id(HashableValue::Int(7)). The enum stays as the carrier — it is what
crosses into the unsafe code — and this is the conversion into it.
Implemented per Rust type rather than blanket over Hash: the value has to
cross into Swift, so it needs a Swift type with a Hashable conformance to
cross as, and that mapping is a decision per type rather than something
derivable.
Required Methods§
Sourcefn into_hashable(self) -> HashableValue<'a>
fn into_hashable(self) -> HashableValue<'a>
This value as the carrier.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".