pub struct SLTNodeArena<A: Hash + Eq + Clone> { /* private fields */ }Implementations§
Source§impl<A: Hash + Eq + Clone> SLTNodeArena<A>
impl<A: Hash + Eq + Clone> SLTNodeArena<A>
pub fn new() -> Self
pub fn alloc(&mut self, node: SLTNode<A>) -> Result<NodeId, SLTNodeFactsError>
Sourcepub fn get_checked(&self, id: NodeId) -> Option<&SLTNode<A>>
pub fn get_checked(&self, id: NodeId) -> Option<&SLTNode<A>>
Look up a node without trusting that an externally supplied ID exists.
Sourcepub fn remap_for_fold_effect_sites(
&mut self,
range: Range<usize>,
remap: impl FnMut(u32, Option<i64>) -> Result<Option<(u32, Option<i64>)>, SLTNodeArenaEditError>,
) -> Result<(), SLTNodeArenaEditError>
pub fn remap_for_fold_effect_sites( &mut self, range: Range<usize>, remap: impl FnMut(u32, Option<i64>) -> Result<Option<(u32, Option<i64>)>, SLTNodeArenaEditError>, ) -> Result<(), SLTNodeArenaEditError>
Rewrite only the runtime-event identity carried by ForFold effects.
The semantic interning cache is rebuilt internally whenever the rewrite
changes a node, so callers cannot leave node storage and cache identity
out of sync. None leaves an effect unchanged.
pub fn get(&self, id: NodeId) -> &SLTNode<A>
pub fn display(&self, id: NodeId) -> NodeDisplay<'_, A>
Trait Implementations§
Source§impl<A: Clone + Hash + Eq + Clone> Clone for SLTNodeArena<A>
impl<A: Clone + Hash + Eq + Clone> Clone for SLTNodeArena<A>
Source§fn clone(&self) -> SLTNodeArena<A>
fn clone(&self) -> SLTNodeArena<A>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de, A> Deserialize<'de> for SLTNodeArena<A>
impl<'de, A> Deserialize<'de> for SLTNodeArena<A>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<A: Eq + Hash + Clone> Eq for SLTNodeArena<A>
Auto Trait Implementations§
impl<A> Freeze for SLTNodeArena<A>
impl<A> RefUnwindSafe for SLTNodeArena<A>where
Vec<SLTNode<A>>: RefUnwindSafe,
HashMap<SLTNode<A>, NodeId, BuildHasherDefault<FxHasher>>: RefUnwindSafe,
impl<A> Send for SLTNodeArena<A>
impl<A> Sync for SLTNodeArena<A>
impl<A> Unpin for SLTNodeArena<A>
impl<A> UnsafeUnpin for SLTNodeArena<A>where
Vec<SLTNode<A>>: UnsafeUnpin,
HashMap<SLTNode<A>, NodeId, BuildHasherDefault<FxHasher>>: UnsafeUnpin,
impl<A> UnwindSafe for SLTNodeArena<A>where
Vec<SLTNode<A>>: UnwindSafe,
HashMap<SLTNode<A>, NodeId, BuildHasherDefault<FxHasher>>: UnwindSafe,
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