pub struct SymPerm<'db>(Id, PhantomData<&'db Value<SymPerm<'static>>>);Tuple Fields§
§0: Id§1: PhantomData<&'db Value<SymPerm<'static>>>Implementations§
Source§impl SymPerm<'static>
impl SymPerm<'static>
pub fn ingredient<Db>(db: &Db) -> &IngredientImpl<Self>where
Db: ?Sized + Database,
Source§impl<'db> SymPerm<'db>
impl<'db> SymPerm<'db>
pub fn new<Db_, T0: Lookup<SymPermKind<'db>> + Hash>(
db: &'db Db_,
kind: T0,
) -> Selfwhere
Db_: ?Sized + Database,
SymPermKind<'db>: HashEqLike<T0>,
pub fn kind<Db_>(self, db: &'db Db_) -> &'db SymPermKind<'db>where
Db_: ?Sized + Database,
Sourcepub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Result
pub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Result
Default debug formatting for this struct (may be useful if you define your own Debug impl)
Source§impl<'db> SymPerm<'db>
impl<'db> SymPerm<'db>
Sourcepub fn fallback(db: &'db dyn Db) -> Self
pub fn fallback(db: &'db dyn Db) -> Self
When we have an inference variable without any bounds,
returns the permission we will fallback to (my).
Sourcepub fn referenced(db: &'db dyn Db, places: Vec<SymPlace<'db>>) -> Self
pub fn referenced(db: &'db dyn Db, places: Vec<SymPlace<'db>>) -> Self
Returns a permission shared with the given places.
Sourcepub fn mutable(db: &'db dyn Db, places: Vec<SymPlace<'db>>) -> Self
pub fn mutable(db: &'db dyn Db, places: Vec<SymPlace<'db>>) -> Self
Returns a permission mutable with the given places.
Sourcepub fn var(db: &'db dyn Db, var: SymVariable<'db>) -> Self
pub fn var(db: &'db dyn Db, var: SymVariable<'db>) -> Self
Returns a generic permission with the given generic variable var.
Sourcepub fn apply(db: &'db dyn Db, perm1: SymPerm<'db>, perm2: SymPerm<'db>) -> Self
pub fn apply(db: &'db dyn Db, perm1: SymPerm<'db>, perm2: SymPerm<'db>) -> Self
Returns a permission perm1 perm2 (e.g., shared[x] mutable[y]).
Sourcepub fn or(db: &'db dyn Db, perm1: SymPerm<'db>, perm2: SymPerm<'db>) -> Self
pub fn or(db: &'db dyn Db, perm1: SymPerm<'db>, perm2: SymPerm<'db>) -> Self
Returns a permission perm1 | perm2
Sourcepub fn apply_to<T>(self, db: &'db dyn Db, term: T) -> Twhere
T: Applicable<'db>,
pub fn apply_to<T>(self, db: &'db dyn Db, term: T) -> Twhere
T: Applicable<'db>,
Apply this permission to the given term (if self is not my).
Trait Implementations§
Source§impl<'db> Applicable<'db> for SymPerm<'db>
impl<'db> Applicable<'db> for SymPerm<'db>
fn apply_from(self, db: &'db dyn Db, perm: SymPerm<'db>) -> Self
Source§impl<'db> AssertKind<'db, SymPerm<'db>> for SymGenericTerm<'db>
impl<'db> AssertKind<'db, SymPerm<'db>> for SymGenericTerm<'db>
fn assert_kind(self, db: &'db dyn Db) -> SymPerm<'db>
Source§impl Configuration for SymPerm<'static>
impl Configuration for SymPerm<'static>
const DEBUG_NAME: &'static str = "SymPerm"
Source§type Fields<'a> = (SymPermKind<'a>,)
type Fields<'a> = (SymPermKind<'a>,)
The fields of the struct being interned.
Source§fn struct_from_id<'db>(id: Id) -> Self::Struct<'db>
fn struct_from_id<'db>(id: Id) -> Self::Struct<'db>
Create an end-user struct from the salsa id Read more
Source§fn deref_struct(s: Self::Struct<'_>) -> Id
fn deref_struct(s: Self::Struct<'_>) -> Id
Deref the struct to yield the underlying id.
Source§impl<'db> From<SymPerm<'db>> for SymGenericTerm<'db>
impl<'db> From<SymPerm<'db>> for SymGenericTerm<'db>
Source§impl<'db> FromInfer<'db> for SymPerm<'db>
impl<'db> FromInfer<'db> for SymPerm<'db>
fn infer(db: &'db dyn Db, var: InferVarIndex) -> Self
Source§impl<'db> FromVar<'db> for SymPerm<'db>
impl<'db> FromVar<'db> for SymPerm<'db>
fn var(db: &'db dyn Db, var: SymVariable<'db>) -> Self
Source§impl<'db> Ord for SymPerm<'db>
impl<'db> Ord for SymPerm<'db>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'db> PartialOrd for SymPerm<'db>
impl<'db> PartialOrd for SymPerm<'db>
Source§impl<'db> Subst<'db> for SymPerm<'db>
impl<'db> Subst<'db> for SymPerm<'db>
Source§type GenericTerm = SymGenericTerm<'db>
type GenericTerm = SymGenericTerm<'db>
The notion of generic term appropriate for this type.
When we substitute variables, this is the type of value that we replace them with.
Source§fn subst_vars(
&self,
db: &'db dyn Db,
map: &Map<SymVariable<'db>, Self::GenericTerm>,
) -> Self::Output
fn subst_vars( &self, db: &'db dyn Db, map: &Map<SymVariable<'db>, Self::GenericTerm>, ) -> Self::Output
Returns a version of
self where universal free variables
have been replaced by the corresponding entry in terms.
If a variable is not present in terms it is not substituted.Source§fn subst_var(
&self,
db: &'db dyn Db,
var: SymVariable<'db>,
term: Self::GenericTerm,
) -> Self::Output
fn subst_var( &self, db: &'db dyn Db, var: SymVariable<'db>, term: Self::GenericTerm, ) -> Self::Output
Replace the variable
var with term.Source§fn resolve_infer_var(
&self,
db: &'db dyn Db,
bound_vars: &mut Vec<SymVariable<'db>>,
op: impl FnMut(InferVarIndex) -> Option<Self::GenericTerm>,
) -> Self::Output
fn resolve_infer_var( &self, db: &'db dyn Db, bound_vars: &mut Vec<SymVariable<'db>>, op: impl FnMut(InferVarIndex) -> Option<Self::GenericTerm>, ) -> Self::Output
Replace all inference variables with whatever is returned by
op;
if op returns None, the inference variable is left unchanged.Source§impl<'db> SubstWith<'db, SymGenericTerm<'db>> for SymPerm<'db>
impl<'db> SubstWith<'db, SymGenericTerm<'db>> for SymPerm<'db>
Source§fn subst_with<'subst>(
&self,
db: &'db dyn Db,
bound_vars: &mut Vec<SymVariable<'db>>,
subst_fns: &mut SubstitutionFns<'_, 'db, SymGenericTerm<'db>>,
) -> Self::Output
fn subst_with<'subst>( &self, db: &'db dyn Db, bound_vars: &mut Vec<SymVariable<'db>>, subst_fns: &mut SubstitutionFns<'_, 'db, SymGenericTerm<'db>>, ) -> Self::Output
Source§impl<'db> ToRedLinkVecs<'db> for SymPerm<'db>
impl<'db> ToRedLinkVecs<'db> for SymPerm<'db>
impl<'db> Copy for SymPerm<'db>
impl<'db> Eq for SymPerm<'db>
impl<'db> LeafBoundTerm<'db> for SymPerm<'db>
impl<'db> Send for SymPerm<'db>
impl<'db> StructuralPartialEq for SymPerm<'db>
impl<'db> Sync for SymPerm<'db>
Auto Trait Implementations§
impl<'db> Freeze for SymPerm<'db>
impl<'db> !RefUnwindSafe for SymPerm<'db>
impl<'db> Unpin for SymPerm<'db>
impl<'db> UnsafeUnpin for SymPerm<'db>
impl<'db> !UnwindSafe for SymPerm<'db>
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<'db, T> BoundTerm<'db> for Twhere
T: LeafBoundTerm<'db>,
impl<'db, T> BoundTerm<'db> for Twhere
T: LeafBoundTerm<'db>,
const BINDER_LEVELS: usize = const BINDER_LEVELS: usize = 0;
type BoundTerm = NeverBinder<T>
type LeafTerm = T
fn bind( _db: &'db (dyn Db + 'static), symbols_to_bind: &mut dyn Iterator<Item = Vec<SymVariable<'db>>>, value: T, ) -> T
fn as_binder(&self) -> Result<&Binder<'db, NeverBinder<T>>, &T>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.§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
Checks if this value is equivalent to the given key. Read more
§impl<T> HashEqLike<T> for T
impl<T> HashEqLike<T> for T
§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>
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