1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! # Protocol is the eqivalent of `traits`.
//!
//! `Protocol` defines the templates for the functions of the trait
//! for the library usage.

// use intertrait::cast::*;

use clojure::lang::*;
use clojure::rust::*;
use intertrait::*;

use crate::*;
castable_to!(SProtocol => [sync] IObject, Protocol);

pub struct SProtocol {
    inner: SPersistentHashSet,
}

impl IObject for SProtocol {
    #[allow(non_snake_case)]
    fn getClass<'a>(&self) -> &'a SClass { todo!() }

    #[allow(non_snake_case)]
    fn hashCode(&self) -> usize { todo!() }

    fn equals(
        &self,
        other: &Object,
    ) -> bool {
        todo!()
    }

    #[allow(non_snake_case)]
    fn toString(&self) -> String { todo!() }
}

pub trait Protocol: IObject {}

impl Protocol {}

impl Protocol for SProtocol {}

impl SProtocol {}