pub struct AdtSortVariant {
field_names: Vec<Symbol>,
sorts: List<Sort>,
}
Fields§
§field_names: Vec<Symbol>
The list of field names as declared in the #[flux::refined_by(...)]
annotation
sorts: List<Sort>
The sort of each of the fields. Note that these can contain sort variables. Methods used to access these sorts guarantee they are properly instantiated.
Implementations§
Source§impl AdtSortVariant
impl AdtSortVariant
pub fn new(fields: Vec<(Symbol, Sort)>) -> Self
pub fn fields(&self) -> usize
pub fn field_names(&self) -> &Vec<Symbol>
pub fn sort_by_field_name(&self, args: &[Sort]) -> FxIndexMap<Symbol, Sort>
pub fn field_by_name( &self, def_id: DefId, args: &[Sort], name: Symbol, ) -> Option<(FieldProj, Sort)>
pub fn field_sorts(&self, args: &[Sort]) -> List<Sort>
Trait Implementations§
Source§impl Debug for AdtSortVariant
impl Debug for AdtSortVariant
Source§impl<__D: TyDecoder> Decodable<__D> for AdtSortVariant
impl<__D: TyDecoder> Decodable<__D> for AdtSortVariant
Source§impl<__E: TyEncoder> Encodable<__E> for AdtSortVariant
impl<__E: TyEncoder> Encodable<__E> for AdtSortVariant
Source§impl Hash for AdtSortVariant
impl Hash for AdtSortVariant
Source§impl PartialEq for AdtSortVariant
impl PartialEq for AdtSortVariant
impl Eq for AdtSortVariant
impl StructuralPartialEq for AdtSortVariant
Auto Trait Implementations§
impl Freeze for AdtSortVariant
impl RefUnwindSafe for AdtSortVariant
impl Send for AdtSortVariant
impl Sync for AdtSortVariant
impl Unpin for AdtSortVariant
impl UnwindSafe for AdtSortVariant
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
§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.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