Skip to main content

Props

Trait Props 

Source
pub unsafe trait Props: Send + Sync { }
Expand description

组件属性 trait,所有可作为组件 props 的类型都需实现此 trait。

  • 需实现 Send + Sync。
  • 推荐使用 #[derive(Props)] 自动实现。

§Safety

实现者需保证类型安全和线程安全。

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Props for NoProps

Source§

impl Props for TextProps

Source§

impl<'a> Props for BorderProps<'a>

Source§

impl<'a> Props for CenterProps<'a>

Source§

impl<'a> Props for ContextProviderProps<'a>

Source§

impl<'a> Props for FragmentProps<'a>

Source§

impl<'a> Props for ModalProps<'a>

Source§

impl<'a> Props for PositionedProps<'a>

Source§

impl<'a> Props for ScrollBars<'a>

Source§

impl<'a> Props for ScrollViewProps<'a>

Source§

impl<'a> Props for ViewProps<'a>

Source§

impl<T: Widget + 'static> Props for WidgetAdapterProps<T>

Source§

impl<T> Props for StatefulWidgetAdapterProps<T>
where T: StatefulWidget + 'static, T::State: Sized + Sync + Send + 'static,