chalk-client 0.1.0

Rust client SDK for the Chalk feature store
Documentation
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Lsp {
    #[prost(message, repeated, tag = "1")]
    pub diagnostics: ::prost::alloc::vec::Vec<PublishDiagnosticsParams>,
    #[prost(message, repeated, tag = "2")]
    pub actions: ::prost::alloc::vec::Vec<CodeAction>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PublishDiagnosticsParams {
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "2")]
    pub diagnostics: ::prost::alloc::vec::Vec<Diagnostic>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Diagnostic {
    #[prost(message, optional, tag = "1")]
    pub range: ::core::option::Option<Range>,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
    #[prost(enumeration = "DiagnosticSeverity", tag = "3")]
    pub severity: i32,
    #[prost(string, optional, tag = "4")]
    pub code: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "5")]
    pub code_description: ::core::option::Option<CodeDescription>,
    #[prost(message, repeated, tag = "6")]
    pub related_information: ::prost::alloc::vec::Vec<DiagnosticRelatedInformation>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Range {
    #[prost(message, optional, tag = "1")]
    pub start: ::core::option::Option<Position>,
    #[prost(message, optional, tag = "2")]
    pub end: ::core::option::Option<Position>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Position {
    #[prost(int32, optional, tag = "1")]
    pub line: ::core::option::Option<i32>,
    #[prost(int32, optional, tag = "2")]
    pub character: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CodeAction {
    #[prost(string, tag = "1")]
    pub title: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "2")]
    pub diagnostics: ::prost::alloc::vec::Vec<Diagnostic>,
    #[prost(message, optional, tag = "3")]
    pub edit: ::core::option::Option<WorkspaceEdit>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkspaceEdit {
    #[prost(message, repeated, tag = "1")]
    pub document_changes: ::prost::alloc::vec::Vec<TextDocumentEdit>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextDocumentEdit {
    #[prost(message, optional, tag = "1")]
    pub text_document: ::core::option::Option<TextDocumentIdentifier>,
    #[prost(message, repeated, tag = "2")]
    pub edits: ::prost::alloc::vec::Vec<TextEdit>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextDocumentIdentifier {
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextEdit {
    #[prost(message, optional, tag = "1")]
    pub range: ::core::option::Option<Range>,
    #[prost(string, tag = "2")]
    pub new_text: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CodeDescription {
    #[prost(string, tag = "1")]
    pub href: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DiagnosticRelatedInformation {
    #[prost(message, optional, tag = "1")]
    pub location: ::core::option::Option<Location>,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Location {
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub range: ::core::option::Option<Range>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DiagnosticSeverity {
    Unspecified = 0,
    Error = 1,
    Warning = 2,
    Information = 3,
    Hint = 4,
}
impl DiagnosticSeverity {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "DIAGNOSTIC_SEVERITY_UNSPECIFIED",
            Self::Error => "DIAGNOSTIC_SEVERITY_ERROR",
            Self::Warning => "DIAGNOSTIC_SEVERITY_WARNING",
            Self::Information => "DIAGNOSTIC_SEVERITY_INFORMATION",
            Self::Hint => "DIAGNOSTIC_SEVERITY_HINT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "DIAGNOSTIC_SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
            "DIAGNOSTIC_SEVERITY_ERROR" => Some(Self::Error),
            "DIAGNOSTIC_SEVERITY_WARNING" => Some(Self::Warning),
            "DIAGNOSTIC_SEVERITY_INFORMATION" => Some(Self::Information),
            "DIAGNOSTIC_SEVERITY_HINT" => Some(Self::Hint),
            _ => None,
        }
    }
}