Enum derive_builder_core::BuilderPattern[][src]

pub enum BuilderPattern {
    Owned,
    Mutable,
    Immutable,
}

Controls the signature of a setter method, more specifically how self is passed and returned.

It can also be generalized to methods with different parameter sets and return types, e.g. the build() method.

Variants

Owned

E.g. fn bar(self, bar: Bar) -> Self.

Mutable

E.g. fn bar(&mut self, bar: Bar) -> &mut Self.

Immutable

E.g. fn bar(&self, bar: Bar) -> Self.

Note:

Implementations

impl BuilderPattern[src]

pub fn requires_clone(&self) -> bool[src]

Returns true if this style of builder needs to be able to clone its fields during the build method.

Trait Implementations

impl Clone for BuilderPattern[src]

impl Debug for BuilderPattern[src]

impl Default for BuilderPattern[src]

Defaults to Mutable.

impl FromMeta for BuilderPattern[src]

impl PartialEq<BuilderPattern> for BuilderPattern[src]

impl Copy for BuilderPattern[src]

impl Eq for BuilderPattern[src]

impl StructuralEq for BuilderPattern[src]

impl StructuralPartialEq for BuilderPattern[src]

Auto Trait Implementations

impl RefUnwindSafe for BuilderPattern

impl Send for BuilderPattern

impl Sync for BuilderPattern

impl Unpin for BuilderPattern

impl UnwindSafe for BuilderPattern

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.