Trait salsa_2022::id::AsId
source · [−]pub trait AsId: Sized + Copy + Eq + Hash + Debug {
fn as_id(self) -> Id;
fn from_id(id: Id) -> Self;
}
Expand description
Trait for types that can be interconverted to a salsa Id;
Required Methods
Implementations on Foreign Types
sourceimpl AsId for ()
impl AsId for ()
As a special case, we permit ()
to be converted to an Id
.
This is useful for declaring functions with no arguments.