canic_core/ids/
endpoint.rs

1///
2/// EndpointCall
3///
4
5#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
6pub struct EndpointCall {
7    pub endpoint: EndpointId,
8    pub kind: EndpointCallKind,
9}
10
11///
12/// EndpointCallKind
13///
14
15#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
16pub enum EndpointCallKind {
17    Query,
18    QueryComposite,
19    Update,
20}
21
22///
23/// EndpointId
24///
25
26#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
27pub struct EndpointId {
28    pub name: &'static str,
29}
30
31impl EndpointId {
32    #[must_use]
33    pub const fn new(name: &'static str) -> Self {
34        Self { name }
35    }
36}