sc2_proto::sc2api

Struct Response

Source
pub struct Response {
    pub id: Option<u32>,
    pub error: RepeatedField<String>,
    pub status: Option<Status>,
    pub response: Option<Response_oneof_response>,
    pub unknown_fields: UnknownFields,
    pub cached_size: CachedSize,
}

Fields§

§id: Option<u32>§error: RepeatedField<String>§status: Option<Status>§response: Option<Response_oneof_response>§unknown_fields: UnknownFields§cached_size: CachedSize

Implementations§

Source§

impl Response

Source

pub fn new() -> Response

Source

pub fn get_create_game(&self) -> &ResponseCreateGame

Source

pub fn clear_create_game(&mut self)

Source

pub fn has_create_game(&self) -> bool

Source

pub fn set_create_game(&mut self, v: ResponseCreateGame)

Source

pub fn mut_create_game(&mut self) -> &mut ResponseCreateGame

Source

pub fn take_create_game(&mut self) -> ResponseCreateGame

Source

pub fn get_join_game(&self) -> &ResponseJoinGame

Source

pub fn clear_join_game(&mut self)

Source

pub fn has_join_game(&self) -> bool

Source

pub fn set_join_game(&mut self, v: ResponseJoinGame)

Source

pub fn mut_join_game(&mut self) -> &mut ResponseJoinGame

Source

pub fn take_join_game(&mut self) -> ResponseJoinGame

Source

pub fn get_restart_game(&self) -> &ResponseRestartGame

Source

pub fn clear_restart_game(&mut self)

Source

pub fn has_restart_game(&self) -> bool

Source

pub fn set_restart_game(&mut self, v: ResponseRestartGame)

Source

pub fn mut_restart_game(&mut self) -> &mut ResponseRestartGame

Source

pub fn take_restart_game(&mut self) -> ResponseRestartGame

Source

pub fn get_start_replay(&self) -> &ResponseStartReplay

Source

pub fn clear_start_replay(&mut self)

Source

pub fn has_start_replay(&self) -> bool

Source

pub fn set_start_replay(&mut self, v: ResponseStartReplay)

Source

pub fn mut_start_replay(&mut self) -> &mut ResponseStartReplay

Source

pub fn take_start_replay(&mut self) -> ResponseStartReplay

Source

pub fn get_leave_game(&self) -> &ResponseLeaveGame

Source

pub fn clear_leave_game(&mut self)

Source

pub fn has_leave_game(&self) -> bool

Source

pub fn set_leave_game(&mut self, v: ResponseLeaveGame)

Source

pub fn mut_leave_game(&mut self) -> &mut ResponseLeaveGame

Source

pub fn take_leave_game(&mut self) -> ResponseLeaveGame

Source

pub fn get_quick_save(&self) -> &ResponseQuickSave

Source

pub fn clear_quick_save(&mut self)

Source

pub fn has_quick_save(&self) -> bool

Source

pub fn set_quick_save(&mut self, v: ResponseQuickSave)

Source

pub fn mut_quick_save(&mut self) -> &mut ResponseQuickSave

Source

pub fn take_quick_save(&mut self) -> ResponseQuickSave

Source

pub fn get_quick_load(&self) -> &ResponseQuickLoad

Source

pub fn clear_quick_load(&mut self)

Source

pub fn has_quick_load(&self) -> bool

Source

pub fn set_quick_load(&mut self, v: ResponseQuickLoad)

Source

pub fn mut_quick_load(&mut self) -> &mut ResponseQuickLoad

Source

pub fn take_quick_load(&mut self) -> ResponseQuickLoad

Source

pub fn get_quit(&self) -> &ResponseQuit

Source

pub fn clear_quit(&mut self)

Source

pub fn has_quit(&self) -> bool

Source

pub fn set_quit(&mut self, v: ResponseQuit)

Source

pub fn mut_quit(&mut self) -> &mut ResponseQuit

Source

pub fn take_quit(&mut self) -> ResponseQuit

Source

pub fn get_game_info(&self) -> &ResponseGameInfo

Source

pub fn clear_game_info(&mut self)

Source

pub fn has_game_info(&self) -> bool

Source

pub fn set_game_info(&mut self, v: ResponseGameInfo)

Source

pub fn mut_game_info(&mut self) -> &mut ResponseGameInfo

Source

pub fn take_game_info(&mut self) -> ResponseGameInfo

Source

pub fn get_observation(&self) -> &ResponseObservation

Source

pub fn clear_observation(&mut self)

Source

pub fn has_observation(&self) -> bool

Source

pub fn set_observation(&mut self, v: ResponseObservation)

Source

pub fn mut_observation(&mut self) -> &mut ResponseObservation

Source

pub fn take_observation(&mut self) -> ResponseObservation

Source

pub fn get_action(&self) -> &ResponseAction

Source

pub fn clear_action(&mut self)

Source

pub fn has_action(&self) -> bool

Source

pub fn set_action(&mut self, v: ResponseAction)

Source

pub fn mut_action(&mut self) -> &mut ResponseAction

Source

pub fn take_action(&mut self) -> ResponseAction

Source

pub fn get_obs_action(&self) -> &ResponseObserverAction

Source

pub fn clear_obs_action(&mut self)

Source

pub fn has_obs_action(&self) -> bool

Source

pub fn set_obs_action(&mut self, v: ResponseObserverAction)

Source

pub fn mut_obs_action(&mut self) -> &mut ResponseObserverAction

Source

pub fn take_obs_action(&mut self) -> ResponseObserverAction

Source

pub fn get_step(&self) -> &ResponseStep

Source

pub fn clear_step(&mut self)

Source

pub fn has_step(&self) -> bool

Source

pub fn set_step(&mut self, v: ResponseStep)

Source

pub fn mut_step(&mut self) -> &mut ResponseStep

Source

pub fn take_step(&mut self) -> ResponseStep

Source

pub fn get_data(&self) -> &ResponseData

Source

pub fn clear_data(&mut self)

Source

pub fn has_data(&self) -> bool

Source

pub fn set_data(&mut self, v: ResponseData)

Source

pub fn mut_data(&mut self) -> &mut ResponseData

Source

pub fn take_data(&mut self) -> ResponseData

Source

pub fn get_query(&self) -> &ResponseQuery

Source

pub fn clear_query(&mut self)

Source

pub fn has_query(&self) -> bool

Source

pub fn set_query(&mut self, v: ResponseQuery)

Source

pub fn mut_query(&mut self) -> &mut ResponseQuery

Source

pub fn take_query(&mut self) -> ResponseQuery

Source

pub fn get_save_replay(&self) -> &ResponseSaveReplay

Source

pub fn clear_save_replay(&mut self)

Source

pub fn has_save_replay(&self) -> bool

Source

pub fn set_save_replay(&mut self, v: ResponseSaveReplay)

Source

pub fn mut_save_replay(&mut self) -> &mut ResponseSaveReplay

Source

pub fn take_save_replay(&mut self) -> ResponseSaveReplay

Source

pub fn get_replay_info(&self) -> &ResponseReplayInfo

Source

pub fn clear_replay_info(&mut self)

Source

pub fn has_replay_info(&self) -> bool

Source

pub fn set_replay_info(&mut self, v: ResponseReplayInfo)

Source

pub fn mut_replay_info(&mut self) -> &mut ResponseReplayInfo

Source

pub fn take_replay_info(&mut self) -> ResponseReplayInfo

Source

pub fn get_available_maps(&self) -> &ResponseAvailableMaps

Source

pub fn clear_available_maps(&mut self)

Source

pub fn has_available_maps(&self) -> bool

Source

pub fn set_available_maps(&mut self, v: ResponseAvailableMaps)

Source

pub fn mut_available_maps(&mut self) -> &mut ResponseAvailableMaps

Source

pub fn take_available_maps(&mut self) -> ResponseAvailableMaps

Source

pub fn get_save_map(&self) -> &ResponseSaveMap

Source

pub fn clear_save_map(&mut self)

Source

pub fn has_save_map(&self) -> bool

Source

pub fn set_save_map(&mut self, v: ResponseSaveMap)

Source

pub fn mut_save_map(&mut self) -> &mut ResponseSaveMap

Source

pub fn take_save_map(&mut self) -> ResponseSaveMap

Source

pub fn get_map_command(&self) -> &ResponseMapCommand

Source

pub fn clear_map_command(&mut self)

Source

pub fn has_map_command(&self) -> bool

Source

pub fn set_map_command(&mut self, v: ResponseMapCommand)

Source

pub fn mut_map_command(&mut self) -> &mut ResponseMapCommand

Source

pub fn take_map_command(&mut self) -> ResponseMapCommand

Source

pub fn get_ping(&self) -> &ResponsePing

Source

pub fn clear_ping(&mut self)

Source

pub fn has_ping(&self) -> bool

Source

pub fn set_ping(&mut self, v: ResponsePing)

Source

pub fn mut_ping(&mut self) -> &mut ResponsePing

Source

pub fn take_ping(&mut self) -> ResponsePing

Source

pub fn get_debug(&self) -> &ResponseDebug

Source

pub fn clear_debug(&mut self)

Source

pub fn has_debug(&self) -> bool

Source

pub fn set_debug(&mut self, v: ResponseDebug)

Source

pub fn mut_debug(&mut self) -> &mut ResponseDebug

Source

pub fn take_debug(&mut self) -> ResponseDebug

Source

pub fn get_id(&self) -> u32

Source

pub fn clear_id(&mut self)

Source

pub fn has_id(&self) -> bool

Source

pub fn set_id(&mut self, v: u32)

Source

pub fn get_error(&self) -> &[String]

Source

pub fn clear_error(&mut self)

Source

pub fn set_error(&mut self, v: RepeatedField<String>)

Source

pub fn mut_error(&mut self) -> &mut RepeatedField<String>

Source

pub fn take_error(&mut self) -> RepeatedField<String>

Source

pub fn get_status(&self) -> Status

Source

pub fn clear_status(&mut self)

Source

pub fn has_status(&self) -> bool

Source

pub fn set_status(&mut self, v: Status)

Trait Implementations§

Source§

impl Clear for Response

Source§

fn clear(&mut self)

Clear this make, make it equivalent to newly created object.
Source§

impl Clone for Response

Source§

fn clone(&self) -> Response

Returns a copy of the value. Read more
1.0.0 · 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<'a> Default for &'a Response

Source§

fn default() -> &'a Response

Returns the “default value” for a type. Read more
Source§

impl Default for Response

Source§

fn default() -> Response

Returns the “default value” for a type. Read more
Source§

impl Message for Response

Source§

fn is_initialized(&self) -> bool

True iff all required fields are initialized. Always returns true for protobuf 3.
Source§

fn merge_from(&mut self, is: &mut CodedInputStream<'_>) -> ProtobufResult<()>

Update this message object with fields read from given stream.
Source§

fn compute_size(&self) -> u32

Compute and cache size of this message and all nested messages
Source§

fn write_to_with_cached_sizes( &self, os: &mut CodedOutputStream<'_>, ) -> ProtobufResult<()>

Write message to the stream. Read more
Source§

fn get_cached_size(&self) -> u32

Get size previously computed by compute_size.
Source§

fn get_unknown_fields(&self) -> &UnknownFields

Get a reference to unknown fields.
Source§

fn mut_unknown_fields(&mut self) -> &mut UnknownFields

Get a mutable reference to unknown fields.
Source§

fn as_any(&self) -> &dyn Any

View self as Any.
Source§

fn as_any_mut(&mut self) -> &mut dyn Any

View self as mutable Any.
Source§

fn into_any(self: Box<Self>) -> Box<dyn Any>

Convert boxed self to boxed Any.
Source§

fn descriptor(&self) -> &'static MessageDescriptor

Message descriptor for this message, used for reflection.
Source§

fn new() -> Response

Create an empty message object. Read more
Source§

fn descriptor_static() -> &'static MessageDescriptor

Get message descriptor for message type. Read more
Source§

fn default_instance() -> &'static Response

Return a pointer to default immutable message with static lifetime. Read more
Source§

fn parse_from(is: &mut CodedInputStream<'_>) -> Result<Self, ProtobufError>
where Self: Sized,

Parse message from stream.
Source§

fn write_to(&self, os: &mut CodedOutputStream<'_>) -> Result<(), ProtobufError>

Write the message to the stream. Read more
Source§

fn write_length_delimited_to( &self, os: &mut CodedOutputStream<'_>, ) -> Result<(), ProtobufError>

Write the message to the stream prepending the message with message length encoded as varint.
Source§

fn write_length_delimited_to_vec( &self, vec: &mut Vec<u8>, ) -> Result<(), ProtobufError>

Write the message to the vec, prepend the message with message length encoded as varint.
Source§

fn merge_from_bytes(&mut self, bytes: &[u8]) -> Result<(), ProtobufError>

Update this message object with fields read from given stream.
Source§

fn parse_from_reader(reader: &mut dyn Read) -> Result<Self, ProtobufError>
where Self: Sized,

Parse message from reader. Parse stops on EOF or when error encountered.
Source§

fn parse_from_bytes(bytes: &[u8]) -> Result<Self, ProtobufError>
where Self: Sized,

Parse message from byte array.
Source§

fn check_initialized(&self) -> Result<(), ProtobufError>

Check if all required fields of this object are initialized.
Source§

fn write_to_writer(&self, w: &mut dyn Write) -> Result<(), ProtobufError>

Write the message to the writer.
Source§

fn write_to_vec(&self, v: &mut Vec<u8>) -> Result<(), ProtobufError>

Write the message to bytes vec.
Source§

fn write_to_bytes(&self) -> Result<Vec<u8>, ProtobufError>

Write the message to bytes vec.
Source§

fn write_length_delimited_to_writer( &self, w: &mut dyn Write, ) -> Result<(), ProtobufError>

Write the message to the writer, prepend the message with message length encoded as varint.
Source§

fn write_length_delimited_to_bytes(&self) -> Result<Vec<u8>, ProtobufError>

Write the message to the bytes vec, prepend the message with message length encoded as varint.
Source§

fn type_id(&self) -> TypeId

Get type id for downcasting.
Source§

impl PartialEq for Response

Source§

fn eq(&self, other: &Response) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ProtobufValue for Response

Source§

fn as_ref(&self) -> ReflectValueRef<'_>

As ref
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert to Any
Source§

fn is_non_zero(&self) -> bool

Is value non-zero?
Source§

fn as_ref_copy(&self) -> ReflectValueRef<'static>

Return ProtobufValueRef if self is Copy. Read more
Source§

impl StructuralPartialEq for Response

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, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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.