mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-09-19 13:36:42 +02:00
add iter_dyn and iter_<dir>_fixed stubs
This commit is contained in:
parent
9c5bfafb7a
commit
e0781571c4
2 changed files with 25 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ use super::*;
|
|||
/// Center.align(W(40).max(H(20.max("Center"))))
|
||||
/// ].iter(), |x|x);
|
||||
/// ```
|
||||
pub fn iter <
|
||||
pub fn iter_dyn <
|
||||
S: Screen, // Target screen
|
||||
D, // Input doesn't need to be [Draw]able, output does
|
||||
V: Fn()->I, // Function that returns the iterator
|
||||
|
|
@ -20,6 +20,12 @@ pub fn iter <
|
|||
thunk(move|_to: &mut S|{ todo!() })
|
||||
}
|
||||
|
||||
pub fn iter <'a, S: Screen, D: 'a, I: Iterator<Item = D>, U: Draw<S>> (
|
||||
_iter: impl Fn()->I, _draw: impl Fn(D, usize)->U,
|
||||
) -> impl Draw<S> {
|
||||
thunk(move|_to: &mut S|{ todo!() })
|
||||
}
|
||||
|
||||
pub fn iter_north <'a, S: Screen, D: 'a, I: Iterator<Item = D>, U: Draw<S>> (
|
||||
_iter: impl Fn()->I, _draw: impl Fn(D, usize)->U,
|
||||
) -> impl Draw<S> {
|
||||
|
|
@ -32,12 +38,24 @@ pub fn iter_east <'a, S: Screen, D: 'a, I: Iterator<Item = D>, U: Draw<S>> (
|
|||
thunk(move|_to: &mut S|{ todo!() })
|
||||
}
|
||||
|
||||
pub fn iter_east_fixed <'a, S: Screen, D: 'a, I: Iterator<Item = D>, U: Draw<S>> (
|
||||
_height: S::Unit, _iter: impl Fn()->I, _draw: impl Fn(D, usize)->U,
|
||||
) -> impl Draw<S> {
|
||||
thunk(move|_to: &mut S|{ todo!() })
|
||||
}
|
||||
|
||||
pub fn iter_south <'a, S: Screen, D: 'a, I: Iterator<Item = D>, U: Draw<S>> (
|
||||
_iter: impl Fn()->I, _draw: impl Fn(D, usize)->U,
|
||||
) -> impl Draw<S> {
|
||||
thunk(move|_to: &mut S|{ todo!() })
|
||||
}
|
||||
|
||||
pub fn iter_south_fixed <'a, S: Screen, D: 'a, I: Iterator<Item = D>, U: Draw<S>> (
|
||||
_height: S::Unit, _iter: impl Fn()->I, _draw: impl Fn(D, usize)->U,
|
||||
) -> impl Draw<S> {
|
||||
thunk(move|_to: &mut S|{ todo!() })
|
||||
}
|
||||
|
||||
pub fn iter_west <'a, S: Screen, D: 'a, I: Iterator<Item = D>, U: Draw<S>> (
|
||||
_iter: impl Fn()->I, _draw: impl Fn(D, usize)->U,
|
||||
) -> impl Draw<S> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue