hara-native 0.1.21

HAL-free native host runtime and package launcher for Hara
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::IIter;
use hara_protocol_macros::hara_protocol;

#[hara_protocol(
    namespace = "std.protocol.iiterator",
    name = "IIterator",
    parents = ["IIter"]
)]
pub trait IIterator: IIter + Iterator<Item = <Self as IIter>::Item> {
    #[hara_method(value = "iter-next", arity = 1)]
    fn iter_next(&mut self) -> Option<<Self as IIter>::Item> {
        self.next()
    }

    #[hara_method(value = "iter-next?", arity = 1)]
    fn iter_next_available(&mut self) -> bool;
}