Struct scrypto::constants::ALWAYS_VISIBLE_GLOBAL_NODES
source · pub struct ALWAYS_VISIBLE_GLOBAL_NODES {
__private_field: (),
}
Fields§
§__private_field: ()
Methods from Deref<Target = IndexSet<NodeId>>§
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if the set contains no elements.
Computes in O(1) time.
sourcepub fn iter(&self) -> Iter<'_, T> ⓘ
pub fn iter(&self) -> Iter<'_, T> ⓘ
Return an iterator over the values of the set, in their order
sourcepub fn difference<S2, 'a>(
&'a self,
other: &'a IndexSet<T, S2>
) -> Difference<'a, T, S2> ⓘwhere
S2: BuildHasher,
pub fn difference<S2, 'a>(
&'a self,
other: &'a IndexSet<T, S2>
) -> Difference<'a, T, S2> ⓘwhere
S2: BuildHasher,
Return an iterator over the values that are in self
but not other
.
Values are produced in the same order that they appear in self
.
sourcepub fn symmetric_difference<S2, 'a>(
&'a self,
other: &'a IndexSet<T, S2>
) -> SymmetricDifference<'a, T, S, S2> ⓘwhere
S2: BuildHasher,
pub fn symmetric_difference<S2, 'a>(
&'a self,
other: &'a IndexSet<T, S2>
) -> SymmetricDifference<'a, T, S, S2> ⓘwhere
S2: BuildHasher,
Return an iterator over the values that are in self
or other
,
but not in both.
Values from self
are produced in their original order, followed by
values from other
in their original order.
sourcepub fn intersection<S2, 'a>(
&'a self,
other: &'a IndexSet<T, S2>
) -> Intersection<'a, T, S2> ⓘwhere
S2: BuildHasher,
pub fn intersection<S2, 'a>(
&'a self,
other: &'a IndexSet<T, S2>
) -> Intersection<'a, T, S2> ⓘwhere
S2: BuildHasher,
Return an iterator over the values that are in both self
and other
.
Values are produced in the same order that they appear in self
.
sourcepub fn union<S2, 'a>(&'a self, other: &'a IndexSet<T, S2>) -> Union<'a, T, S> ⓘwhere
S2: BuildHasher,
pub fn union<S2, 'a>(&'a self, other: &'a IndexSet<T, S2>) -> Union<'a, T, S> ⓘwhere
S2: BuildHasher,
Return an iterator over all values that are in self
or other
.
Values from self
are produced in their original order, followed by
values that are unique to other
in their original order.
sourcepub fn contains<Q>(&self, value: &Q) -> bool
pub fn contains<Q>(&self, value: &Q) -> bool
Return true
if an equivalent to value
exists in the set.
Computes in O(1) time (average).
sourcepub fn get<Q>(&self, value: &Q) -> Option<&T>
pub fn get<Q>(&self, value: &Q) -> Option<&T>
Return a reference to the value stored in the set, if it is present,
else None
.
Computes in O(1) time (average).
sourcepub fn get_index_of<Q>(&self, value: &Q) -> Option<usize>
pub fn get_index_of<Q>(&self, value: &Q) -> Option<usize>
Return item index, if it exists in the set
sourcepub fn as_slice(&self) -> &Slice<T>
pub fn as_slice(&self) -> &Slice<T>
Returns a slice of all the values in the set.
Computes in O(1) time.
sourcepub fn get_index(&self, index: usize) -> Option<&T>
pub fn get_index(&self, index: usize) -> Option<&T>
Get a value by index
Valid indices are 0 <= index < self.len()
Computes in O(1) time.
sourcepub fn get_range<R>(&self, range: R) -> Option<&Slice<T>>where
R: RangeBounds<usize>,
pub fn get_range<R>(&self, range: R) -> Option<&Slice<T>>where
R: RangeBounds<usize>,
Returns a slice of values in the given range of indices.
Valid indices are 0 <= index < self.len()
Computes in O(1) time.
sourcepub fn is_disjoint<S2>(&self, other: &IndexSet<T, S2>) -> boolwhere
S2: BuildHasher,
pub fn is_disjoint<S2>(&self, other: &IndexSet<T, S2>) -> boolwhere
S2: BuildHasher,
Returns true
if self
has no elements in common with other
.
sourcepub fn is_subset<S2>(&self, other: &IndexSet<T, S2>) -> boolwhere
S2: BuildHasher,
pub fn is_subset<S2>(&self, other: &IndexSet<T, S2>) -> boolwhere
S2: BuildHasher,
Returns true
if all elements of self
are contained in other
.
sourcepub fn is_superset<S2>(&self, other: &IndexSet<T, S2>) -> boolwhere
S2: BuildHasher,
pub fn is_superset<S2>(&self, other: &IndexSet<T, S2>) -> boolwhere
S2: BuildHasher,
Returns true
if all elements of other
are contained in self
.
Trait Implementations§
source§impl Deref for ALWAYS_VISIBLE_GLOBAL_NODES
impl Deref for ALWAYS_VISIBLE_GLOBAL_NODES
impl LazyStatic for ALWAYS_VISIBLE_GLOBAL_NODES
Auto Trait Implementations§
impl RefUnwindSafe for ALWAYS_VISIBLE_GLOBAL_NODES
impl Send for ALWAYS_VISIBLE_GLOBAL_NODES
impl Sync for ALWAYS_VISIBLE_GLOBAL_NODES
impl Unpin for ALWAYS_VISIBLE_GLOBAL_NODES
impl UnwindSafe for ALWAYS_VISIBLE_GLOBAL_NODES
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read more