pub struct KeyBuilder { /* private fields */ }Expand description
KeyBuilder collects column names and attributes, producing a model::Key.
Implementations§
Source§impl KeyBuilder
impl KeyBuilder
pub fn new(key_type: KeyType) -> Self
pub fn add_column<S: Into<String>>(self, name: S) -> Self
pub fn cluster(self, v: bool) -> Self
pub fn compress(self, v: bool) -> Self
pub fn unique(self, v: bool) -> Self
pub fn include<S: Into<String>>(self, s: S) -> Self
pub fn build(self) -> Key
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyBuilder
impl RefUnwindSafe for KeyBuilder
impl Send for KeyBuilder
impl Sync for KeyBuilder
impl Unpin for KeyBuilder
impl UnsafeUnpin for KeyBuilder
impl UnwindSafe for KeyBuilder
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