Struct rs::imservice::ContentHint
source · [−]pub struct ContentHint {
bits: u32,
}
Expand description
Map to text_input_unstable_v3.content_hint
values
Fields
bits: u32
Implementations
sourceimpl ContentHint
impl ContentHint
pub const NONE: ContentHint = ContentHint{bits: 0,}
pub const COMPLETION: ContentHint = ContentHint{bits: 1,}
pub const SPELLCHECK: ContentHint = ContentHint{bits: 2,}
pub const AUTO_CAPITALIZATION: ContentHint = ContentHint{bits: 4,}
pub const LOWERCASE: ContentHint = ContentHint{bits: 8,}
pub const UPPERCASE: ContentHint = ContentHint{bits: 16,}
pub const TITLECASE: ContentHint = ContentHint{bits: 32,}
pub const HIDDEN_TEXT: ContentHint = ContentHint{bits: 64,}
pub const SENSITIVE_DATA: ContentHint = ContentHint{bits: 128,}
pub const LATIN: ContentHint = ContentHint{bits: 256,}
pub const MULTILINE: ContentHint = ContentHint{bits: 512,}
sourcepub const fn empty() -> ContentHint
pub const fn empty() -> ContentHint
Returns an empty set of flags
sourcepub const fn all() -> ContentHint
pub const fn all() -> ContentHint
Returns the set containing all flags.
sourcepub fn from_bits(bits: u32) -> Option<ContentHint>
pub fn from_bits(bits: u32) -> Option<ContentHint>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: u32) -> ContentHint
pub const fn from_bits_truncate(bits: u32) -> ContentHint
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> ContentHint
pub const unsafe fn from_bits_unchecked(bits: u32) -> ContentHint
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
sourcepub const fn intersects(&self, other: ContentHint) -> bool
pub const fn intersects(&self, other: ContentHint) -> bool
Returns true
if there are flags common to both self
and other
.
sourcepub const fn contains(&self, other: ContentHint) -> bool
pub const fn contains(&self, other: ContentHint) -> bool
Returns true
all of the flags in other
are contained within self
.
sourcepub fn insert(&mut self, other: ContentHint)
pub fn insert(&mut self, other: ContentHint)
Inserts the specified flags in-place.
sourcepub fn remove(&mut self, other: ContentHint)
pub fn remove(&mut self, other: ContentHint)
Removes the specified flags in-place.
sourcepub fn toggle(&mut self, other: ContentHint)
pub fn toggle(&mut self, other: ContentHint)
Toggles the specified flags in-place.
sourcepub fn set(&mut self, other: ContentHint, value: bool)
pub fn set(&mut self, other: ContentHint, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
sourceimpl Binary for ContentHint
impl Binary for ContentHint
sourceimpl BitAnd<ContentHint> for ContentHint
impl BitAnd<ContentHint> for ContentHint
sourcefn bitand(self, other: ContentHint) -> ContentHint
fn bitand(self, other: ContentHint) -> ContentHint
Returns the intersection between the two sets of flags.
type Output = ContentHint
type Output = ContentHint
The resulting type after applying the &
operator.
sourceimpl BitAndAssign<ContentHint> for ContentHint
impl BitAndAssign<ContentHint> for ContentHint
sourcefn bitand_assign(&mut self, other: ContentHint)
fn bitand_assign(&mut self, other: ContentHint)
Disables all flags disabled in the set.
sourceimpl BitOr<ContentHint> for ContentHint
impl BitOr<ContentHint> for ContentHint
sourcefn bitor(self, other: ContentHint) -> ContentHint
fn bitor(self, other: ContentHint) -> ContentHint
Returns the union of the two sets of flags.
type Output = ContentHint
type Output = ContentHint
The resulting type after applying the |
operator.
sourceimpl BitOrAssign<ContentHint> for ContentHint
impl BitOrAssign<ContentHint> for ContentHint
sourcefn bitor_assign(&mut self, other: ContentHint)
fn bitor_assign(&mut self, other: ContentHint)
Adds the set of flags.
sourceimpl BitXor<ContentHint> for ContentHint
impl BitXor<ContentHint> for ContentHint
sourcefn bitxor(self, other: ContentHint) -> ContentHint
fn bitxor(self, other: ContentHint) -> ContentHint
Returns the left flags, but with all the right flags toggled.
type Output = ContentHint
type Output = ContentHint
The resulting type after applying the ^
operator.
sourceimpl BitXorAssign<ContentHint> for ContentHint
impl BitXorAssign<ContentHint> for ContentHint
sourcefn bitxor_assign(&mut self, other: ContentHint)
fn bitxor_assign(&mut self, other: ContentHint)
Toggles the set of flags.
sourceimpl Clone for ContentHint
impl Clone for ContentHint
sourcefn clone(&self) -> ContentHint
fn clone(&self) -> ContentHint
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ContentHint
impl Debug for ContentHint
sourceimpl Extend<ContentHint> for ContentHint
impl Extend<ContentHint> for ContentHint
sourcefn extend<T: IntoIterator<Item = ContentHint>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = ContentHint>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl FromIterator<ContentHint> for ContentHint
impl FromIterator<ContentHint> for ContentHint
sourcefn from_iter<T: IntoIterator<Item = ContentHint>>(iterator: T) -> ContentHint
fn from_iter<T: IntoIterator<Item = ContentHint>>(iterator: T) -> ContentHint
Creates a value from an iterator. Read more
sourceimpl Hash for ContentHint
impl Hash for ContentHint
sourceimpl LowerHex for ContentHint
impl LowerHex for ContentHint
sourceimpl Not for ContentHint
impl Not for ContentHint
sourcefn not(self) -> ContentHint
fn not(self) -> ContentHint
Returns the complement of this set of flags.
type Output = ContentHint
type Output = ContentHint
The resulting type after applying the !
operator.
sourceimpl Octal for ContentHint
impl Octal for ContentHint
sourceimpl Ord for ContentHint
impl Ord for ContentHint
sourceimpl PartialEq<ContentHint> for ContentHint
impl PartialEq<ContentHint> for ContentHint
sourcefn eq(&self, other: &ContentHint) -> bool
fn eq(&self, other: &ContentHint) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ContentHint) -> bool
fn ne(&self, other: &ContentHint) -> bool
This method tests for !=
.
sourceimpl PartialOrd<ContentHint> for ContentHint
impl PartialOrd<ContentHint> for ContentHint
sourcefn partial_cmp(&self, other: &ContentHint) -> Option<Ordering>
fn partial_cmp(&self, other: &ContentHint) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Sub<ContentHint> for ContentHint
impl Sub<ContentHint> for ContentHint
sourcefn sub(self, other: ContentHint) -> ContentHint
fn sub(self, other: ContentHint) -> ContentHint
Returns the set difference of the two sets of flags.
type Output = ContentHint
type Output = ContentHint
The resulting type after applying the -
operator.
sourceimpl SubAssign<ContentHint> for ContentHint
impl SubAssign<ContentHint> for ContentHint
sourcefn sub_assign(&mut self, other: ContentHint)
fn sub_assign(&mut self, other: ContentHint)
Disables all flags enabled in the set.
sourceimpl UpperHex for ContentHint
impl UpperHex for ContentHint
impl Copy for ContentHint
impl Eq for ContentHint
impl StructuralEq for ContentHint
impl StructuralPartialEq for ContentHint
Auto Trait Implementations
impl RefUnwindSafe for ContentHint
impl Send for ContentHint
impl Sync for ContentHint
impl Unpin for ContentHint
impl UnwindSafe for ContentHint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.