pub struct EnvironmentView<K: EnvKey> {
pub metadata: *const c_void,
pub witness_table: *const c_void,
pub id: i64,
/* private fields */
}Expand description
A runtime-built Swift view type with a real @Environment.
struct RustEnv: View {
@Environment(\.colorScheme) var value
var id: Int
var body: some View { <built by a Rust closure> }
}The body receives whatever SwiftUI has in scope — so a view built this way
follows the system appearance, or the nearest .environment(...), without
Rust being told about the change.
Fields§
§metadata: *const c_void§witness_table: *const c_void§id: i64Implementations§
Source§impl<K: EnvKey> EnvironmentView<K>
impl<K: EnvKey> EnvironmentView<K>
Trait Implementations§
Source§impl<K: EnvKey> Drop for EnvironmentView<K>
impl<K: EnvKey> Drop for EnvironmentView<K>
Auto Trait Implementations§
impl<K> !Send for EnvironmentView<K>
impl<K> !Sync for EnvironmentView<K>
impl<K> Freeze for EnvironmentView<K>
impl<K> RefUnwindSafe for EnvironmentView<K>
impl<K> Unpin for EnvironmentView<K>
impl<K> UnsafeUnpin for EnvironmentView<K>
impl<K> UnwindSafe for EnvironmentView<K>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more