pub struct TermId {
pub namespace: Option<IString>,
pub id: Option<NonMaxU32>,
}
Expand description
Represents an ID string of the form name#id
or name#
.
Fields§
§namespace: Option<IString>
§id: Option<NonMaxU32>
Implementations§
Source§impl TermId
impl TermId
Sourcepub fn parse(strings: &mut StringTable, value: &str) -> Result<Self>
pub fn parse(strings: &mut StringTable, value: &str) -> Result<Self>
Splits an ID string into namespace and ID number. 0 is used for identifiers without a number (usually for theory-solving ‘quantifiers’ such as “basic#”, “arith#”)
pub fn order(&self) -> u32
pub fn to_string_components<'a>( &self, strings: &'a StringTable, ) -> (&'a str, Option<NonMaxU32>)
pub fn to_string(&self, strings: &StringTable) -> String
Trait Implementations§
Source§impl<'a: 'b, 'b> DisplayWithCtxt<DisplayCtxt<'b>, ()> for &'a TermId
impl<'a: 'b, 'b> DisplayWithCtxt<DisplayCtxt<'b>, ()> for &'a TermId
Source§fn fmt_with(
self,
f: &mut Formatter<'_>,
ctxt: &DisplayCtxt<'b>,
_data: &mut (),
) -> Result
fn fmt_with( self, f: &mut Formatter<'_>, ctxt: &DisplayCtxt<'b>, _data: &mut (), ) -> Result
Display the term with the given context and data. Should not be used
outside of the implementations of this trait.
Source§fn with(self, ctxt: &Ctxt) -> DisplayWrapperEmpty<'_, Ctxt, Data, Self>
fn with(self, ctxt: &Ctxt) -> DisplayWrapperEmpty<'_, Ctxt, Data, Self>
Wrap the receiver in an object which carries along a parser context to
enable efficient printing of terms. For quick debugging use the
debug
method instead to avoid building a full context.Source§fn with_data<'a, 'b>(
self,
ctxt: &'a Ctxt,
data: &'b mut Data,
) -> DisplayWrapperData<'a, 'b, Ctxt, Data, Self>where
Self: Copy,
fn with_data<'a, 'b>(
self,
ctxt: &'a Ctxt,
data: &'b mut Data,
) -> DisplayWrapperData<'a, 'b, Ctxt, Data, Self>where
Self: Copy,
To be used with
TermIdx
or SynthIdx
where we want to pass in the
surrounding quantifier as data
such that qvars are printed with names.
Otherwise, always use with
instead (which uses default data
).impl Copy for TermId
impl Eq for TermId
impl StructuralPartialEq for TermId
Auto Trait Implementations§
impl Freeze for TermId
impl RefUnwindSafe for TermId
impl Send for TermId
impl Sync for TermId
impl Unpin for TermId
impl UnwindSafe for TermId
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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