Skip to main content

Set

Trait Set 

Source
pub trait Set {
    // Provided methods
    fn set<M>(self, modifier: M) -> Self
       where M: Modifier<Self>,
             Self: Sized { ... }
    fn set_mut<M>(&mut self, modifier: M) -> &mut Self
       where M: Modifier<Self> { ... }
}
Expand description

A trait providing the set and set_mut methods for all types.

Simply implement this for your types and they can be used with modifiers.

Provided Methods§

Source

fn set<M>(self, modifier: M) -> Self
where M: Modifier<Self>, Self: Sized,

Modify self using the provided modifier.

Source

fn set_mut<M>(&mut self, modifier: M) -> &mut Self
where M: Modifier<Self>,

Modify self through a mutable reference with the provided modifier.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<'a> Set for Delete<'a>

Source§

impl<'a> Set for Insert<'a>

Source§

impl<'a> Set for Select<'a>

Source§

impl<'a> Set for Update<'a>