Struct matrix_sdk::room::ReportedContentScore
source · 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§fn eq(&self, other: &ReportedContentScore) -> bool
fn eq(&self, other: &ReportedContentScore) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<i8> for ReportedContentScore
impl PartialEq<i8> for ReportedContentScore
source§impl PartialEq for ReportedContentScore
impl PartialEq for ReportedContentScore
source§fn eq(&self, other: &ReportedContentScore) -> bool
fn eq(&self, other: &ReportedContentScore) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ReportedContentScore> for i8
impl PartialOrd<ReportedContentScore> for i8
source§fn partial_cmp(&self, other: &ReportedContentScore) -> Option<Ordering>
fn partial_cmp(&self, other: &ReportedContentScore) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd<i8> for ReportedContentScore
impl PartialOrd<i8> for ReportedContentScore
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl PartialOrd for ReportedContentScore
impl PartialOrd for ReportedContentScore
source§fn partial_cmp(&self, other: &ReportedContentScore) -> Option<Ordering>
fn partial_cmp(&self, other: &ReportedContentScore) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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