Skip to main content

Response

Enum Response 

Source
pub enum Response {
    Analyze(AnalysisResponse),
    NoResults {
        id: String,
        turn_number: usize,
    },
    QueryVersion {
        id: String,
        version: String,
        git_hash: String,
    },
    ClearCache {
        id: String,
    },
    Terminate {
        id: String,
        terminate_id: String,
        turn_numbers: Option<Vec<usize>>,
    },
    TerminateAll {
        id: String,
        turn_numbers: Option<Vec<usize>>,
    },
    QueryModels {
        id: String,
        models: Vec<Model>,
    },
    GeneralError {
        error: String,
    },
    FieldError {
        id: String,
        error: String,
        field: String,
    },
    FieldWarning {
        id: String,
        warning: String,
        field: String,
    },
}
Expand description

A response from the analysis engine.

Variants§

§

Analyze(AnalysisResponse)

The result of analyzing a position.

§

NoResults

Indicates that analysis was terminated before analyzing the specified position.

Fields

§id: String

The request ID.

§turn_number: usize

The position index, where 0 is the position before the first move.

§

QueryVersion

KataGo’s version information.

Fields

§id: String

The request ID.

§version: String

A string indicating the most recent KataGo release version that this version is a descendant of, such as "1.6.1".

§git_hash: String

The precise git hash this KataGo version was compiled from, or the string "<omitted>" if KataGo was compiled separately from its repo or without Git support.

§

ClearCache

Indicates that the cache was cleared.

Fields

§id: String

The request ID.

§

Terminate

Acknowledgement of a terminate request. The engine will proceed to send NoResults or partial Analyze responses for each position after they have been terminated.

Fields

§id: String

The request ID.

§terminate_id: String

The ID of the request being terminated.

§turn_numbers: Option<Vec<usize>>

The positions being terminated, if specified in the request.

§

TerminateAll

Acknowledgement of a request to terminate all analyses. The engine will proceed to send NoResults or partial Analyze responses for each position after they have been terminated.

Fields

§id: String

The request ID.

§turn_numbers: Option<Vec<usize>>

The positions being terminated, if specified in the request.

§

QueryModels

Information about the currently loaded neural network models.

Fields

§id: String

The request ID.

§models: Vec<Model>

A list of available models.

§

GeneralError

An error with no known associated request.

Fields

§error: String

The error message.

§

FieldError

An error in processing a request.

Fields

§id: String

The request ID.

§error: String

The error message.

§field: String

The request field which is the source of the error.

§

FieldWarning

A warning in processing a request. The engine will still generate analysis responses for the request.

Fields

§id: String

The request ID.

§warning: String

The warning message.

§field: String

The request field which is the source of the warning.

Trait Implementations§

Source§

impl Clone for Response

Source§

fn clone(&self) -> Response

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Response

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Response

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl TryFrom<Value> for Response

Source§

type Error = String

The type returned in the event of a conversion error.
Source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,