pub struct VariableFlags(/* private fields */);
Implementations§
Source§impl VariableFlags
impl VariableFlags
Sourcepub const NONE: VariableFlags
pub const NONE: VariableFlags
Nothing.
Sourcepub const MODIFIED: VariableFlags
pub const MODIFIED: VariableFlags
A variable was externally modified.
Sourcepub const NEED_SYNC: VariableFlags
pub const NEED_SYNC: VariableFlags
A variable must be synced with respective variable from data model.
Source§impl VariableFlags
impl VariableFlags
Sourcepub const fn empty() -> VariableFlags
pub const fn empty() -> VariableFlags
Get a flags value with all bits unset.
Sourcepub const fn all() -> VariableFlags
pub const fn all() -> VariableFlags
Get a flags value with all known bits set.
Sourcepub const fn bits(&self) -> u8
pub const fn bits(&self) -> u8
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u8) -> Option<VariableFlags>
pub const fn from_bits(bits: u8) -> Option<VariableFlags>
Convert from a bits value.
This method will return None
if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u8) -> VariableFlags
pub const fn from_bits_truncate(bits: u8) -> VariableFlags
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u8) -> VariableFlags
pub const fn from_bits_retain(bits: u8) -> VariableFlags
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<VariableFlags>
pub fn from_name(name: &str) -> Option<VariableFlags>
Get a flags value with the bits of a flag with the given name set.
This method will return None
if name
is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: VariableFlags) -> bool
pub const fn intersects(&self, other: VariableFlags) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: VariableFlags) -> bool
pub const fn contains(&self, other: VariableFlags) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn insert(&mut self, other: VariableFlags)
pub fn insert(&mut self, other: VariableFlags)
The bitwise or (|
) of the bits in two flags values.
Sourcepub fn remove(&mut self, other: VariableFlags)
pub fn remove(&mut self, other: VariableFlags)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
remove
won’t truncate other
, but the !
operator will.
Sourcepub fn toggle(&mut self, other: VariableFlags)
pub fn toggle(&mut self, other: VariableFlags)
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub fn set(&mut self, other: VariableFlags, value: bool)
pub fn set(&mut self, other: VariableFlags, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
Sourcepub const fn intersection(self, other: VariableFlags) -> VariableFlags
pub const fn intersection(self, other: VariableFlags) -> VariableFlags
The bitwise and (&
) of the bits in two flags values.
Sourcepub const fn union(self, other: VariableFlags) -> VariableFlags
pub const fn union(self, other: VariableFlags) -> VariableFlags
The bitwise or (|
) of the bits in two flags values.
Sourcepub const fn difference(self, other: VariableFlags) -> VariableFlags
pub const fn difference(self, other: VariableFlags) -> VariableFlags
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
Sourcepub const fn symmetric_difference(self, other: VariableFlags) -> VariableFlags
pub const fn symmetric_difference(self, other: VariableFlags) -> VariableFlags
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub const fn complement(self) -> VariableFlags
pub const fn complement(self) -> VariableFlags
The bitwise negation (!
) of the bits in a flags value, truncating the result.
Source§impl VariableFlags
impl VariableFlags
Sourcepub const fn iter(&self) -> Iter<VariableFlags>
pub const fn iter(&self) -> Iter<VariableFlags>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<VariableFlags>
pub const fn iter_names(&self) -> IterNames<VariableFlags>
Yield a set of contained named flags values.
This method is like iter
, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Binary for VariableFlags
impl Binary for VariableFlags
Source§impl BitAnd for VariableFlags
impl BitAnd for VariableFlags
Source§fn bitand(self, other: VariableFlags) -> VariableFlags
fn bitand(self, other: VariableFlags) -> VariableFlags
The bitwise and (&
) of the bits in two flags values.
Source§type Output = VariableFlags
type Output = VariableFlags
&
operator.Source§impl BitAndAssign for VariableFlags
impl BitAndAssign for VariableFlags
Source§fn bitand_assign(&mut self, other: VariableFlags)
fn bitand_assign(&mut self, other: VariableFlags)
The bitwise and (&
) of the bits in two flags values.
Source§impl BitOr for VariableFlags
impl BitOr for VariableFlags
Source§fn bitor(self, other: VariableFlags) -> VariableFlags
fn bitor(self, other: VariableFlags) -> VariableFlags
The bitwise or (|
) of the bits in two flags values.
Source§type Output = VariableFlags
type Output = VariableFlags
|
operator.Source§impl BitOrAssign for VariableFlags
impl BitOrAssign for VariableFlags
Source§fn bitor_assign(&mut self, other: VariableFlags)
fn bitor_assign(&mut self, other: VariableFlags)
The bitwise or (|
) of the bits in two flags values.
Source§impl BitXor for VariableFlags
impl BitXor for VariableFlags
Source§fn bitxor(self, other: VariableFlags) -> VariableFlags
fn bitxor(self, other: VariableFlags) -> VariableFlags
The bitwise exclusive-or (^
) of the bits in two flags values.
Source§type Output = VariableFlags
type Output = VariableFlags
^
operator.Source§impl BitXorAssign for VariableFlags
impl BitXorAssign for VariableFlags
Source§fn bitxor_assign(&mut self, other: VariableFlags)
fn bitxor_assign(&mut self, other: VariableFlags)
The bitwise exclusive-or (^
) of the bits in two flags values.
Source§impl Clone for VariableFlags
impl Clone for VariableFlags
Source§fn clone(&self) -> VariableFlags
fn clone(&self) -> VariableFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for VariableFlags
impl Debug for VariableFlags
Source§impl Extend<VariableFlags> for VariableFlags
impl Extend<VariableFlags> for VariableFlags
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = VariableFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = VariableFlags>,
The bitwise or (|
) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl Flags for VariableFlags
impl Flags for VariableFlags
Source§const FLAGS: &'static [Flag<VariableFlags>]
const FLAGS: &'static [Flag<VariableFlags>]
Source§fn from_bits_retain(bits: u8) -> VariableFlags
fn from_bits_retain(bits: u8) -> VariableFlags
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true
if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|
) of the bits in two flags values.Source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read moreSource§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^
) of the bits in two flags values.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read moreSource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.Source§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.Source§impl FromIterator<VariableFlags> for VariableFlags
impl FromIterator<VariableFlags> for VariableFlags
Source§fn from_iter<T>(iterator: T) -> VariableFlagswhere
T: IntoIterator<Item = VariableFlags>,
fn from_iter<T>(iterator: T) -> VariableFlagswhere
T: IntoIterator<Item = VariableFlags>,
The bitwise or (|
) of the bits in each flags value.
Source§impl IntoIterator for VariableFlags
impl IntoIterator for VariableFlags
Source§type Item = VariableFlags
type Item = VariableFlags
Source§type IntoIter = Iter<VariableFlags>
type IntoIter = Iter<VariableFlags>
Source§fn into_iter(self) -> <VariableFlags as IntoIterator>::IntoIter
fn into_iter(self) -> <VariableFlags as IntoIterator>::IntoIter
Source§impl LowerHex for VariableFlags
impl LowerHex for VariableFlags
Source§impl Not for VariableFlags
impl Not for VariableFlags
Source§fn not(self) -> VariableFlags
fn not(self) -> VariableFlags
The bitwise negation (!
) of the bits in a flags value, truncating the result.
Source§type Output = VariableFlags
type Output = VariableFlags
!
operator.Source§impl Octal for VariableFlags
impl Octal for VariableFlags
Source§impl Ord for VariableFlags
impl Ord for VariableFlags
Source§fn cmp(&self, other: &VariableFlags) -> Ordering
fn cmp(&self, other: &VariableFlags) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for VariableFlags
impl PartialEq for VariableFlags
Source§impl PartialOrd for VariableFlags
impl PartialOrd for VariableFlags
Source§impl Reflect for VariableFlags
impl Reflect for VariableFlags
fn source_path() -> &'static str
fn type_name(&self) -> &'static str
fn doc(&self) -> &'static str
Source§fn assembly_name(&self) -> &'static str
fn assembly_name(&self) -> &'static str
#[derive(Reflect)]
) to ensure that this method will return correct assembly
name. In other words - there’s no guarantee, that any implementation other than proc-macro
will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME")
as an implementation.Source§fn type_assembly_name() -> &'static str
fn type_assembly_name() -> &'static str
#[derive(Reflect)]
) to ensure that this method will return correct assembly
name. In other words - there’s no guarantee, that any implementation other than proc-macro
will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME")
as an implementation.fn fields_info(&self, func: &mut dyn FnMut(&[FieldInfo<'_, '_>]))
fn into_any(self: Box<VariableFlags>) -> Box<dyn Any>
fn set( &mut self, value: Box<dyn Reflect>, ) -> Result<Box<dyn Reflect>, Box<dyn Reflect>>
fn as_any(&self, func: &mut dyn FnMut(&(dyn Any + 'static)))
fn as_any_mut(&mut self, func: &mut dyn FnMut(&mut (dyn Any + 'static)))
fn as_reflect(&self, func: &mut dyn FnMut(&(dyn Reflect + 'static)))
fn as_reflect_mut(&mut self, func: &mut dyn FnMut(&mut (dyn Reflect + 'static)))
fn fields(&self, func: &mut dyn FnMut(&[&(dyn Reflect + 'static)]))
fn fields_mut( &mut self, func: &mut dyn FnMut(&mut [&mut (dyn Reflect + 'static)]), )
fn field( &self, name: &str, func: &mut dyn FnMut(Option<&(dyn Reflect + 'static)>), )
fn field_mut( &mut self, name: &str, func: &mut dyn FnMut(Option<&mut (dyn Reflect + 'static)>), )
Source§fn set_field(
&mut self,
field: &str,
value: Box<dyn Reflect>,
func: &mut dyn FnMut(Result<Box<dyn Reflect>, Box<dyn Reflect>>),
)
fn set_field( &mut self, field: &str, value: Box<dyn Reflect>, func: &mut dyn FnMut(Result<Box<dyn Reflect>, Box<dyn Reflect>>), )
#[reflect(setter = ..)]
or falls back to
Reflect::field_mut
fn as_array(&self, func: &mut dyn FnMut(Option<&(dyn ReflectArray + 'static)>))
fn as_array_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectArray + 'static)>), )
fn as_list(&self, func: &mut dyn FnMut(Option<&(dyn ReflectList + 'static)>))
fn as_list_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectList + 'static)>), )
fn as_inheritable_variable( &self, func: &mut dyn FnMut(Option<&(dyn ReflectInheritableVariable + 'static)>), )
fn as_inheritable_variable_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectInheritableVariable + 'static)>), )
fn as_hash_map( &self, func: &mut dyn FnMut(Option<&(dyn ReflectHashMap + 'static)>), )
fn as_hash_map_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectHashMap + 'static)>), )
Source§impl Sub for VariableFlags
impl Sub for VariableFlags
Source§fn sub(self, other: VariableFlags) -> VariableFlags
fn sub(self, other: VariableFlags) -> VariableFlags
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
Source§type Output = VariableFlags
type Output = VariableFlags
-
operator.Source§impl SubAssign for VariableFlags
impl SubAssign for VariableFlags
Source§fn sub_assign(&mut self, other: VariableFlags)
fn sub_assign(&mut self, other: VariableFlags)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
Source§impl UpperHex for VariableFlags
impl UpperHex for VariableFlags
impl Copy for VariableFlags
impl Eq for VariableFlags
impl StructuralPartialEq for VariableFlags
Auto Trait Implementations§
impl Freeze for VariableFlags
impl RefUnwindSafe for VariableFlags
impl Send for VariableFlags
impl Sync for VariableFlags
impl Unpin for VariableFlags
impl UnwindSafe for VariableFlags
Blanket Implementations§
Source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult for T
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Any
. Could be used to downcast a trait object
to a particular type.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Any
. Could be used to downcast a trait object
to a particular type.fn into_any(self: Box<T>) -> Box<dyn Any>
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere
T: 'static,
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 moreSource§impl<T> MessageData for T
impl<T> MessageData for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ReflectBase for Twhere
T: Reflect,
impl<T> ReflectBase for Twhere
T: Reflect,
fn as_any_raw(&self) -> &(dyn Any + 'static)
fn as_any_raw_mut(&mut self) -> &mut (dyn Any + 'static)
Source§impl<T> ResolvePath for Twhere
T: Reflect,
impl<T> ResolvePath for Twhere
T: Reflect,
fn resolve_path<'p>( &self, path: &'p str, func: &mut dyn FnMut(Result<&(dyn Reflect + 'static), ReflectPathError<'p>>), )
fn resolve_path_mut<'p>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut (dyn Reflect + 'static), ReflectPathError<'p>>), )
fn get_resolve_path<'p, T>(
&self,
path: &'p str,
func: &mut dyn FnMut(Result<&T, ReflectPathError<'p>>),
)where
T: Reflect,
fn get_resolve_path_mut<'p, T>(
&mut self,
path: &'p str,
func: &mut dyn FnMut(Result<&mut T, ReflectPathError<'p>>),
)where
T: Reflect,
Source§impl<T> ScriptMessagePayload for T
impl<T> ScriptMessagePayload for T
Source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
self
as &dyn Any
Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
self
as &dyn Any
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.