lgtm-cli 0.3.0

Run LGTM code reviews with a bundled web UI and gRPC server.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Object discriminator in concurrency tokens.
use serde::{Deserialize, Serialize};

/// Object tokens bind a scope revision to the exact comment or thread that a client read.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub enum ObjectKind {
    Comment,
    Thread,
}

impl ObjectKind {
    pub fn as_str(self) -> &'static str {
        match self {
            Self::Comment => "comment",
            Self::Thread => "thread",
        }
    }
}