pub struct ShareSet { /* private fields */ }
Expand description
Stores a Hashset that contains the type names of all components and primitives
marked with either “share” or “state_share”,depending on what the user wants.
Methods implemented by this struct can
be used to determine whether a given cell is shareable or not
Used by live_range_analysis.rs
, cell_share.rs
, and infer_share.rs
Implementations§
pub fn new(shareable: HashSet<Id>, is_state_share: bool) -> Self
Sourcepub fn from_context<const IS_STATE_SHARE: bool>(ctx: &Context) -> Self
pub fn from_context<const IS_STATE_SHARE: bool>(ctx: &Context) -> Self
Constructs a shareset from the context. Looks for “state_share” types if is_state_share is true, and “share” types otherwise.
Returns whether or not this instance is state_share
Given a set of shareable and a cell, determines whether cell’s type is shareable or not
Trait Implementations§
Auto Trait Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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