pub struct RatingSystem;Expand description
Rating system for community feedback
Implementations§
Source§impl RatingSystem
impl RatingSystem
pub fn new() -> Self
pub async fn get_average_rating(&self, _plugin_id: &str) -> Result<f32>
pub async fn submit_rating( &self, _plugin_id: &str, _user_id: &str, _rating: f32, ) -> Result<()>
pub async fn get_rating_distribution( &self, _plugin_id: &str, ) -> Result<HashMap<u8, u64>>
pub async fn get_active_user_count(&self) -> Result<u64>
Trait Implementations§
Source§impl Clone for RatingSystem
impl Clone for RatingSystem
Source§fn clone(&self) -> RatingSystem
fn clone(&self) -> RatingSystem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RatingSystem
impl Debug for RatingSystem
Auto Trait Implementations§
impl Freeze for RatingSystem
impl RefUnwindSafe for RatingSystem
impl Send for RatingSystem
impl Sync for RatingSystem
impl Unpin for RatingSystem
impl UnwindSafe for RatingSystem
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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