mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 19:56:44 +01:00
This commit is contained in:
parent
1ef898ac32
commit
2557a0d253
7 changed files with 605 additions and 342 deletions
|
|
@ -12,10 +12,10 @@
|
|||
|
||||
/// Define a trait an implement it for read-only wrapper types. */
|
||||
#[macro_export] macro_rules! flex_trait (
|
||||
($Trait:ident $(<$($A:ident:$T:ident),+>)? $(:$dep:ident $(+$dep2:ident)*)? {
|
||||
($Trait:ident $(<$($A:ident:$T:ident),+>)? $(:$dep:ident $(<$dtt:tt>)? $(+$dep2:ident $(<$dtt2:tt>)?)*)? {
|
||||
$(fn $fn:ident (&$self:ident $(, $arg:ident:$ty:ty)*) -> $ret:ty $body:block)*
|
||||
}) => {
|
||||
pub trait $Trait $(<$($A: $T),+>)? $(:$dep$(+$dep2)*)? {
|
||||
pub trait $Trait $(<$($A: $T),+>)? $(:$dep $(<$dtt>)? $(+$dep2 $(<$dtt2>)?)*)? {
|
||||
$(fn $fn (&$self $(,$arg:$ty)*) -> $ret $body)*
|
||||
}
|
||||
impl<$($($A: $T,)+)? _T_: $Trait $(<$($A),+>)?> $Trait $(<$($A),+>)? for &_T_ {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue