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
use puffin::agent::AgentName;
use puffin::algebra::dynamic_function::TypeShape;
use puffin::claims::Claim;
use puffin::dummy_extract_knowledge;
use puffin::error::Error;
use puffin::protocol::{EvaluatedTerm, ProtocolTypes};
use puffin::trace::{Knowledge, Source};

use crate::protocol::SshProtocolTypes;

#[derive(Debug, Clone)]
pub struct SshClaimInner;
dummy_extract_knowledge!(SshProtocolTypes, Box<SshClaimInner>);

#[derive(Debug, Clone)]
pub struct SshClaim {
    agent_name: AgentName,
    inner: Box<SshClaimInner>,
}

impl Claim<SshProtocolTypes> for SshClaim {
    fn agent_name(&self) -> AgentName {
        self.agent_name
    }

    fn id(&self) -> TypeShape<SshProtocolTypes> {
        TypeShape::of::<SshClaimInner>()
    }

    fn inner(&self) -> Box<dyn EvaluatedTerm<SshProtocolTypes>> {
        Box::new(self.inner.clone())
    }
}

dummy_extract_knowledge!(SshProtocolTypes, SshClaim);