pub struct ReportedContentScore(/* private fields */);
Expand description
The score to rate an inappropriate content.
Must be a value between 0
, inoffensive, and -100
, very offensive.
Implementations§
Source§impl ReportedContentScore
impl ReportedContentScore
Sourcepub const MIN: Self = _
pub const MIN: Self = _
The smallest value that can be represented by this type.
This is for very offensive content.
Sourcepub const MAX: Self = _
pub const MAX: Self = _
The largest value that can be represented by this type.
This is for inoffensive content.
Sourcepub fn new(value: i8) -> Option<Self>
pub fn new(value: i8) -> Option<Self>
Try to create a ReportedContentScore
from the provided i8
.
Returns None
if it is smaller than ReportedContentScore::MIN
or
larger than ReportedContentScore::MAX
.
This is the same as the TryFrom<i8>
implementation for
ReportedContentScore
, except that it returns an Option
instead
of a Result
.
Sourcepub fn new_saturating(value: i8) -> Self
pub fn new_saturating(value: i8) -> Self
Create a ReportedContentScore
from the provided i8
clamped to the
acceptable interval.
The given value gets clamped into the closed interval between
ReportedContentScore::MIN
and ReportedContentScore::MAX
.
Trait Implementations§
Source§impl Clone for ReportedContentScore
impl Clone for ReportedContentScore
Source§fn clone(&self) -> ReportedContentScore
fn clone(&self) -> ReportedContentScore
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ReportedContentScore
impl Debug for ReportedContentScore
Source§impl From<ReportedContentScore> for Int
impl From<ReportedContentScore> for Int
Source§fn from(value: ReportedContentScore) -> Self
fn from(value: ReportedContentScore) -> Self
Source§impl Ord for ReportedContentScore
impl Ord for ReportedContentScore
Source§fn cmp(&self, other: &ReportedContentScore) -> Ordering
fn cmp(&self, other: &ReportedContentScore) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq<ReportedContentScore> for i8
impl PartialEq<ReportedContentScore> for i8
Source§impl PartialEq<i8> for ReportedContentScore
impl PartialEq<i8> for ReportedContentScore
Source§impl PartialEq for ReportedContentScore
impl PartialEq for ReportedContentScore
Source§impl PartialOrd<ReportedContentScore> for i8
impl PartialOrd<ReportedContentScore> for i8
Source§impl PartialOrd<i8> for ReportedContentScore
impl PartialOrd<i8> for ReportedContentScore
Source§impl PartialOrd for ReportedContentScore
impl PartialOrd for ReportedContentScore
Source§impl TryFrom<Int> for ReportedContentScore
impl TryFrom<Int> for ReportedContentScore
Source§impl TryFrom<i16> for ReportedContentScore
impl TryFrom<i16> for ReportedContentScore
Source§impl TryFrom<i32> for ReportedContentScore
impl TryFrom<i32> for ReportedContentScore
Source§impl TryFrom<i64> for ReportedContentScore
impl TryFrom<i64> for ReportedContentScore
Source§impl TryFrom<i8> for ReportedContentScore
impl TryFrom<i8> for ReportedContentScore
impl Copy for ReportedContentScore
impl Eq for ReportedContentScore
impl StructuralPartialEq for ReportedContentScore
Auto Trait Implementations§
impl Freeze for ReportedContentScore
impl RefUnwindSafe for ReportedContentScore
impl Send for ReportedContentScore
impl Sync for ReportedContentScore
impl Unpin for ReportedContentScore
impl UnwindSafe for ReportedContentScore
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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