Skip to main content

hara_native/lang/protocol/
iencodevisitor.rs

1use hara_protocol_macros::hara_protocol;
2
3#[hara_protocol(namespace = "std.protocol.iencodevisitor", name = "IEncodeVisitor")]
4pub trait IEncodeVisitor {
5    type Value;
6    type Output;
7
8    #[hara_method(value = "visit-nil", arity = 1)]
9    fn visit_nil(&mut self) -> Self::Output;
10    #[hara_method(value = "visit-boolean", arity = 2)]
11    fn visit_boolean(&mut self, value: Self::Value) -> Self::Output;
12    #[hara_method(value = "visit-number", arity = 2)]
13    fn visit_number(&mut self, value: Self::Value) -> Self::Output;
14    #[hara_method(value = "visit-character", arity = 2)]
15    fn visit_character(&mut self, value: Self::Value) -> Self::Output;
16    #[hara_method(value = "visit-string", arity = 2)]
17    fn visit_string(&mut self, value: Self::Value) -> Self::Output;
18    #[hara_method(value = "visit-keyword", arity = 2)]
19    fn visit_keyword(&mut self, value: Self::Value) -> Self::Output;
20    #[hara_method(value = "visit-symbol", arity = 2)]
21    fn visit_symbol(&mut self, value: Self::Value) -> Self::Output;
22    #[hara_method(value = "visit-seq", arity = 2)]
23    fn visit_seq(&mut self, value: Self::Value) -> Self::Output;
24    #[hara_method(value = "visit-vector", arity = 2)]
25    fn visit_vector(&mut self, value: Self::Value) -> Self::Output;
26    #[hara_method(value = "visit-map", arity = 2)]
27    fn visit_map(&mut self, value: Self::Value) -> Self::Output;
28    #[hara_method(value = "visit-set", arity = 2)]
29    fn visit_set(&mut self, value: Self::Value) -> Self::Output;
30    #[hara_method(value = "visit-tagged", arity = 3)]
31    fn visit_tagged(&mut self, tag: Self::Value, value: Self::Value) -> Self::Output;
32    #[hara_method(value = "visit-unknown", arity = 2)]
33    fn visit_unknown(&mut self, value: Self::Value) -> Self::Output;
34}