Skip to main content

Props

Trait Props 

Source
pub trait Props {
    type Builder;

    // Required method
    fn builder() -> Self::Builder;
}
Expand description

A props struct with a generated typestate builder.

Implemented by #[derive(Props)]. The derive also generates an inherent builder() function on the struct, so this trait only needs to be in scope when the builder is constructed generically.

Required Associated Types§

Source

type Builder

The builder type in its initial state, with no properties set.

Required Methods§

Source

fn builder() -> Self::Builder

Returns a builder with no properties set.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§