Skip to main content

hara_native/lang/protocol/
icoll.rs

1use super::{IConj, IDisplay, IEmpty, IEquality, IHash};
2use hara_protocol_macros::hara_protocol;
3
4#[hara_protocol(
5    namespace = "std.protocol.icoll",
6    name = "IColl",
7    parents = ["IEquality", "IConj", "IEmpty", "IHash", "IDisplay"],
8    availability = "portable"
9)]
10pub trait IColl<E>:
11    IntoIterator<Item = E> + IEquality + IConj<E> + IEmpty + IHash + IDisplay
12{
13    #[hara_method(value = "start-string", arity = 1)]
14    fn start_string(&self) -> &'static str;
15    #[hara_method(value = "end-string", arity = 1)]
16    fn end_string(&self) -> &'static str;
17
18    #[hara_method(value = "sep-string", arity = 1)]
19    fn separator(&self) -> &'static str {
20        " "
21    }
22}