Struct libhealth::model::UserBuilder
source · pub struct UserBuilder { /* private fields */ }
Expand description
A builder-pattern type to construct User
objects.
Implementations§
source§impl UserBuilder
impl UserBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new UserBuilder
.
sourcepub fn build(self) -> User
pub fn build(self) -> User
Build the UserBuilder
.
pub fn user_id(self, user_id: i64) -> Self
pub fn user_name(self, user_name: &str) -> Self
pub fn user_birthday(self, user_birthday: DateTime) -> Self
pub fn user_height(self, user_height: Length) -> Self
pub fn user_weightgoal(self, user_weightgoal: Mass) -> Self
pub fn user_stepgoal(self, user_stepgoal: i64) -> Self
pub fn enabled_plugins(self, enabled_plugins: Vec<PluginName>) -> Self
pub fn recent_activity_types( self, recent_activity_types: Vec<ActivityType> ) -> Self
pub fn did_initial_setup(self, did_initial_setup: bool) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for UserBuilder
impl !Send for UserBuilder
impl !Sync for UserBuilder
impl Unpin for UserBuilder
impl !UnwindSafe for UserBuilder
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where F: FnOnce(&Self) -> bool,
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more