Struct sbr::data::Interaction [−][src]
pub struct Interaction { /* fields omitted */ }
Basic interaction type.
Methods
impl Interaction
[src]
impl Interaction
pub fn new(user_id: UserId, item_id: ItemId, timestamp: Timestamp) -> Self
[src]
pub fn new(user_id: UserId, item_id: ItemId, timestamp: Timestamp) -> Self
Create a new interaction.
impl Interaction
[src]
impl Interaction
pub fn user_id(&self) -> UserId
[src]
pub fn user_id(&self) -> UserId
Return the user id.
pub fn item_id(&self) -> ItemId
[src]
pub fn item_id(&self) -> ItemId
Return the item id.
pub fn weight(&self) -> f32
[src]
pub fn weight(&self) -> f32
Return the interaction weight.
pub fn timestamp(&self) -> Timestamp
[src]
pub fn timestamp(&self) -> Timestamp
Return the interaction timestamp.
Trait Implementations
impl Clone for Interaction
[src]
impl Clone for Interaction
fn clone(&self) -> Interaction
[src]
fn clone(&self) -> Interaction
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Interaction
[src]
impl Debug for Interaction
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for Interaction
[src]
impl Eq for Interaction
impl Hash for Interaction
[src]
impl Hash for Interaction
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
[src]Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for Interaction
[src]
impl PartialEq for Interaction
fn eq(&self, other: &Interaction) -> bool
[src]
fn eq(&self, other: &Interaction) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Interaction) -> bool
[src]
fn ne(&self, other: &Interaction) -> bool
This method tests for !=
.
Auto Trait Implementations
impl Send for Interaction
impl Send for Interaction
impl Sync for Interaction
impl Sync for Interaction