Skip to main content

equatable_text

Function equatable_text 

Source
pub fn equatable_text(text: &str) -> ViewHandle
Expand description

Text(verbatim:).equatable() — an EquatableView<Text>.

equatable() is @_alwaysEmitIntoClient and its whole body is EquatableView(content: self); EquatableView has one stored property, so there is nothing to call — the Text is the value.

It takes a Text rather than a ViewHandle because the constraint is Self: Equatable, and AnyView — which every handle in this crate is — does not conform. A view erased into AnyView genuinely cannot be made equatable; that is a property of AnyView, not a gap in the binding.