pub struct ItemUid {
pub uid: String,
}
Expand description
Each item can be marked with a unique identifier. This is useful whenever the payload of an attribute is a piece of Rust code (an expression, a path, a type…). We don’t want to retrieve those pieces of Rust code as raw token stream: we want to let Rustc give meaning to those. For instance, we want Rustc to type expressions and to resolve paths.
Thus, we expand attributes with Rust-code-payloads as top-level
items marked with an ItemUid
. The attributes are then replaced
in place with a simple reference (the ItemUid
in stake).
Morally, we expand struct Foo { #[refine(x > 3)] x: u32 }
to:
#[uuid(A_UNIQUE_ID_123)] fn refinement(x: u32) -> hax_lib::Prop {x > 3}
;struct Foo { #[refined_by(A_UNIQUE_ID_123)] x: u32 }
.
Fields§
§uid: String
Currently, this is a UUID.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ItemUid
impl<'de> Deserialize<'de> for ItemUid
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ItemUid
impl RefUnwindSafe for ItemUid
impl Send for ItemUid
impl Sync for ItemUid
impl Unpin for ItemUid
impl UnwindSafe for ItemUid
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