mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 11:46:42 +01:00
parent
f21781e816
commit
9a12e0c7ba
1 changed files with 9 additions and 3 deletions
|
|
@ -28,9 +28,15 @@ macro_rules! transform_xy {
|
||||||
($x:literal $y:literal $xy:literal |$self:ident : $Enum:ident, $to:ident|$area:expr) => {
|
($x:literal $y:literal $xy:literal |$self:ident : $Enum:ident, $to:ident|$area:expr) => {
|
||||||
pub enum $Enum<T> { X(T), Y(T), XY(T) }
|
pub enum $Enum<T> { X(T), Y(T), XY(T) }
|
||||||
impl<T> $Enum<T> {
|
impl<T> $Enum<T> {
|
||||||
#[inline] pub const fn x (item: T) -> Self { Self::X(item) }
|
#[inline] pub const fn x (item: T) -> Self {
|
||||||
#[inline] pub const fn y (item: T) -> Self { Self::Y(item) }
|
Self::X(item)
|
||||||
#[inline] pub const fn xy (item: T) -> Self { Self::XY(item) }
|
}
|
||||||
|
#[inline] pub const fn y (item: T) -> Self {
|
||||||
|
Self::Y(item)
|
||||||
|
}
|
||||||
|
#[inline] pub const fn xy (item: T) -> Self {
|
||||||
|
Self::XY(item)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#[cfg(feature = "dsl")]
|
#[cfg(feature = "dsl")]
|
||||||
impl<'state, E: Output + 'state, T: ViewContext<'state, E>> TryFromDsl<'state, T>
|
impl<'state, E: Output + 'state, T: ViewContext<'state, E>> TryFromDsl<'state, T>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue