pub struct Type(_);
Expand description

Type is represents a type or severity of inappropriateness. They can be combined with bitwise AND and OR operators, and are not mutually exclusive.

For example, the following means profane or at-least moderately mean: Type::PROFANE | (Type::MEAN & Type::MODERATE_OR_HIGHER)

Implementations

Bad words.

Offensive words.

Sexual words.

Mean words.

Words intended to evade detection.

Spam/gibberish/SHOUTING.

One of a very small number of safe phases. Recommended to enforce this on users who repeatedly evade the filter.

Not that bad.

Bad.

Cover your eyes!

Any level; Type::MILD, Type::MODERATE, or Type::SEVERE.

Any level in excess of Type::MILD.

The default Type, meaning profane, offensive, sexual, or severely mean.

Any type of detection (except SAFE). This will be expanded to cover all future types.

No type of detection.

Returns true if and only if self, the analysis result, meets the given threshold.

Logical opposite of Self::is.

👎Deprecated: this is for backwards-compatibility, use Type::NONE instead
👎Deprecated: this is for backwards-compatibility, compare with Type::NONE instead
👎Deprecated: this is for backwards-compatibility, there is no replacement

Trait Implementations

The resulting type after applying the & operator.
Performs the & operation. Read more
Performs the &= operation. Read more
The resulting type after applying the | operator.
Performs the | operation. Read more
Performs the |= operation. Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Note: Can’t impl directly on TypeRepr due to https://github.com/bitflags/bitflags/issues/218

Formats the value using the given formatter. Read more

Returns a reasonable default for censoring or blocking.

Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
The resulting type after applying the ! operator.
Performs the unary ! operation. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.