pub struct IrPool { /* private fields */ }Implementations§
Source§impl IrPool
impl IrPool
pub fn new() -> Self
pub const fn zero(&self) -> IrId
pub const fn one(&self) -> IrId
pub fn get_class_set(&self, id: ClassSetId) -> &ClassSet
pub fn class(&mut self, set: ClassSetId, prov: Prov) -> IrId
pub fn anchor(&mut self, kind: AnchorKind, prov: Prov) -> IrId
pub fn alt( &mut self, left: IrId, right: IrId, prov: Prov, ordered: bool, ) -> IrId
pub fn seq(&mut self, left: IrId, right: IrId, prov: Prov) -> IrId
pub fn star(&mut self, inner: IrId, prov: Prov, greedy: bool) -> IrId
pub fn kind(&self, id: IrId) -> &IrKind
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn nullable(&mut self, root: IrId) -> bool
pub fn nullable(&mut self, root: IrId) -> bool
Return whether root accepts the empty string, caching every visited result.
§Panics
Panics only if the IR arena’s internal child-reference invariant is broken.
pub fn display(&self, root: IrId) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IrPool
impl RefUnwindSafe for IrPool
impl Send for IrPool
impl Sync for IrPool
impl Unpin for IrPool
impl UnsafeUnpin for IrPool
impl UnwindSafe for IrPool
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