pub struct UserBuilder { /* private fields */ }
Expand description
Builder for User
.
Implementations§
source§impl UserBuilder
impl UserBuilder
sourcepub fn uaid(&mut self, value: Uuid) -> &mut Self
pub fn uaid(&mut self, value: Uuid) -> &mut Self
The UAID. This is generally a UUID4. It needs to be globally unique.
sourcepub fn connected_at(&mut self, value: u64) -> &mut Self
pub fn connected_at(&mut self, value: u64) -> &mut Self
Time in milliseconds that the user last connected at
sourcepub fn router_type(&mut self, value: String) -> &mut Self
pub fn router_type(&mut self, value: String) -> &mut Self
Router type of the user
sourcepub fn router_data(&mut self, value: HashMap<String, Value>) -> &mut Self
pub fn router_data(&mut self, value: HashMap<String, Value>) -> &mut Self
Router-specific data
sourcepub fn node_id(&mut self, value: String) -> &mut Self
pub fn node_id(&mut self, value: String) -> &mut Self
Last node/port the client was or may be connected to
sourcepub fn record_version(&mut self, value: u64) -> &mut Self
pub fn record_version(&mut self, value: u64) -> &mut Self
Record version
sourcepub fn current_timestamp(&mut self, value: u64) -> &mut Self
pub fn current_timestamp(&mut self, value: u64) -> &mut Self
the timestamp of the last notification sent to the user This field is exclusive to the Bigtable data scheme
sourcepub fn version(&mut self, value: Uuid) -> &mut Self
pub fn version(&mut self, value: Uuid) -> &mut Self
UUID4 version number for optimistic locking of updates on Bigtable
sourcepub fn priv_channels(&mut self, value: HashSet<Uuid>) -> &mut Self
pub fn priv_channels(&mut self, value: HashSet<Uuid>) -> &mut Self
Set of user’s channel ids. These are stored in router (user) record’s row in Bigtable. They are read along with the rest of the user record so that them, along with every other field in the router record, will automatically have their TTL (cell timestamp) reset during [DbClient::update_user].
This is solely used for the sake of that update thus private. [DbClient::get_channels] is preferred for reading the latest version of the channel ids (partly due to historical purposes but also is a more flexible API that might benefit different, non Bigtable [DbClient] backends that don’t necessarily store the channel ids in the router record).
Trait Implementations§
source§impl Clone for UserBuilder
impl Clone for UserBuilder
source§fn clone(&self) -> UserBuilder
fn clone(&self) -> UserBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for UserBuilder
impl RefUnwindSafe for UserBuilder
impl Send for UserBuilder
impl Sync for UserBuilder
impl Unpin for UserBuilder
impl UnwindSafe for UserBuilder
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)