pub struct SymbolTablePtr{ /* private fields */ }Implementations§
Source§impl SymbolTablePtr
impl SymbolTablePtr
Sourcepub fn new() -> SymbolTablePtr
pub fn new() -> SymbolTablePtr
Create an empty new SymbolTable and return a shared pointer to it
Sourcepub fn with_parent(symbols: SymbolTablePtr) -> SymbolTablePtr
pub fn with_parent(symbols: SymbolTablePtr) -> SymbolTablePtr
Create an empty new SymbolTable with the given parent and return a shared pointer to it
Sourcepub fn read(&self) -> RwLockReadGuard<'_, RawRwLock, SymbolTable>
pub fn read(&self) -> RwLockReadGuard<'_, RawRwLock, SymbolTable>
Read the underlying symbol table. This will block the current thread until a read lock can be acquired.
§WARNING
- If the current thread already holds a lock over this table, this may deadlock.
Sourcepub fn write(&self) -> RwLockWriteGuard<'_, RawRwLock, SymbolTable>
pub fn write(&self) -> RwLockWriteGuard<'_, RawRwLock, SymbolTable>
Mutate the underlying symbol table. This will block the current thread until an exclusive write lock can be acquired.
§WARNING
- If the current thread already holds a lock over this table, this may deadlock.
- Trying to acquire any other lock until the write lock is released will cause a deadlock.
- This will mutate the underlying data, which may be shared between other
SymbolTablePtrs. Make sure that this is what you want.
To create a separate copy of the table, see SymbolTablePtr::detach.
Sourcepub fn detach(&self) -> SymbolTablePtr
pub fn detach(&self) -> SymbolTablePtr
Create a new symbol table with the same contents as this one, but a new ID, and return a pointer to it.
Trait Implementations§
Source§impl Biplate<SymbolTablePtr> for AbstractComprehension
impl Biplate<SymbolTablePtr> for AbstractComprehension
Source§fn biplate(
&self,
) -> (Tree<SymbolTablePtr>, Box<dyn Fn(Tree<SymbolTablePtr>) -> AbstractComprehension>)
fn biplate( &self, ) -> (Tree<SymbolTablePtr>, Box<dyn Fn(Tree<SymbolTablePtr>) -> AbstractComprehension>)
§fn with_children_bi(&self, children: VecDeque<To>) -> Self
fn with_children_bi(&self, children: VecDeque<To>) -> Self
§fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self
Uniplate::descend] Read more§fn universe_bi(&self) -> VecDeque<To>
fn universe_bi(&self) -> VecDeque<To>
§fn children_bi(&self) -> VecDeque<To>
fn children_bi(&self) -> VecDeque<To>
§fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Source§impl Biplate<SymbolTablePtr> for Expression
impl Biplate<SymbolTablePtr> for Expression
Source§fn biplate(
&self,
) -> (Tree<SymbolTablePtr>, Box<dyn Fn(Tree<SymbolTablePtr>) -> Expression>)
fn biplate( &self, ) -> (Tree<SymbolTablePtr>, Box<dyn Fn(Tree<SymbolTablePtr>) -> Expression>)
§fn with_children_bi(&self, children: VecDeque<To>) -> Self
fn with_children_bi(&self, children: VecDeque<To>) -> Self
§fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self
Uniplate::descend] Read more§fn universe_bi(&self) -> VecDeque<To>
fn universe_bi(&self) -> VecDeque<To>
§fn children_bi(&self) -> VecDeque<To>
fn children_bi(&self) -> VecDeque<To>
§fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Source§impl Biplate<SymbolTablePtr> for SymbolTable
impl Biplate<SymbolTablePtr> for SymbolTable
Source§fn biplate(
&self,
) -> (Tree<SymbolTablePtr>, Box<dyn Fn(Tree<SymbolTablePtr>) -> SymbolTable>)
fn biplate( &self, ) -> (Tree<SymbolTablePtr>, Box<dyn Fn(Tree<SymbolTablePtr>) -> SymbolTable>)
§fn with_children_bi(&self, children: VecDeque<To>) -> Self
fn with_children_bi(&self, children: VecDeque<To>) -> Self
§fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self
Uniplate::descend] Read more§fn universe_bi(&self) -> VecDeque<To>
fn universe_bi(&self) -> VecDeque<To>
§fn children_bi(&self) -> VecDeque<To>
fn children_bi(&self) -> VecDeque<To>
§fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Source§impl<To> Biplate<To> for SymbolTablePtrwhere
SymbolTable: Biplate<To>,
To: Uniplate,
impl<To> Biplate<To> for SymbolTablePtrwhere
SymbolTable: Biplate<To>,
To: Uniplate,
Source§fn biplate(&self) -> (Tree<To>, Box<dyn Fn(Tree<To>) -> SymbolTablePtr>)
fn biplate(&self) -> (Tree<To>, Box<dyn Fn(Tree<To>) -> SymbolTablePtr>)
§fn with_children_bi(&self, children: VecDeque<To>) -> Self
fn with_children_bi(&self, children: VecDeque<To>) -> Self
§fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl Fn(To) -> To) -> Self
Uniplate::descend] Read more§fn universe_bi(&self) -> VecDeque<To>
fn universe_bi(&self) -> VecDeque<To>
§fn children_bi(&self) -> VecDeque<To>
fn children_bi(&self) -> VecDeque<To>
§fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Source§impl Clone for SymbolTablePtr
impl Clone for SymbolTablePtr
Source§fn clone(&self) -> SymbolTablePtr
fn clone(&self) -> SymbolTablePtr
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SymbolTablePtr
impl Debug for SymbolTablePtr
Source§impl Default for SymbolTablePtr
impl Default for SymbolTablePtr
Source§fn default() -> SymbolTablePtr
fn default() -> SymbolTablePtr
Source§impl DefaultWithId for SymbolTablePtr
impl DefaultWithId for SymbolTablePtr
Source§fn default_with_id(id: ObjId) -> SymbolTablePtr
fn default_with_id(id: ObjId) -> SymbolTablePtr
T, but with the given id.Source§impl HasId for SymbolTablePtr
impl HasId for SymbolTablePtr
Source§impl Hash for SymbolTablePtr
impl Hash for SymbolTablePtr
Source§impl PartialEq for SymbolTablePtr
impl PartialEq for SymbolTablePtr
Source§impl Uniplate for SymbolTablePtr
impl Uniplate for SymbolTablePtr
Source§fn uniplate(
&self,
) -> (Tree<SymbolTablePtr>, Box<dyn Fn(Tree<SymbolTablePtr>) -> SymbolTablePtr>)
fn uniplate( &self, ) -> (Tree<SymbolTablePtr>, Box<dyn Fn(Tree<SymbolTablePtr>) -> SymbolTablePtr>)
Uniplate. Read more§fn descend(&self, op: &impl Fn(Self) -> Self) -> Self
fn descend(&self, op: &impl Fn(Self) -> Self) -> Self
§fn universe(&self) -> VecDeque<Self>
fn universe(&self) -> VecDeque<Self>
§fn with_children(&self, children: VecDeque<Self>) -> Self
fn with_children(&self, children: VecDeque<Self>) -> Self
§fn transform(&self, f: &impl Fn(Self) -> Self) -> Self
fn transform(&self, f: &impl Fn(Self) -> Self) -> Self
§fn rewrite(&self, f: &impl Fn(Self) -> Option<Self>) -> Self
fn rewrite(&self, f: &impl Fn(Self) -> Option<Self>) -> Self
§fn cata<T>(&self, op: &impl Fn(Self, VecDeque<T>) -> T) -> T
fn cata<T>(&self, op: &impl Fn(Self, VecDeque<T>) -> T) -> T
impl Eq for SymbolTablePtr
impl StructuralPartialEq for SymbolTablePtr
Auto Trait Implementations§
impl Freeze for SymbolTablePtr
impl !RefUnwindSafe for SymbolTablePtr
impl Send for SymbolTablePtr
impl Sync for SymbolTablePtr
impl Unpin for SymbolTablePtr
impl UnsafeUnpin for SymbolTablePtr
impl !UnwindSafe for SymbolTablePtr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes