pub struct Request {
pub id: Option<u32>,
pub request: Option<Request_oneof_request>,
pub unknown_fields: UnknownFields,
pub cached_size: CachedSize,
}
Expand description
Request to the SC2 API.
§Usage
let mut request = Request::new();
/* modify request through it's methods */
let response = self.api().send(request)?;
Generated files are compatible only with the same version of protobuf runtime.
Fields§
§id: Option<u32>
§request: Option<Request_oneof_request>
§unknown_fields: UnknownFields
§cached_size: CachedSize
Implementations§
Source§impl Request
impl Request
pub fn new() -> Request
pub fn get_create_game(&self) -> &RequestCreateGame
pub fn clear_create_game(&mut self)
pub fn has_create_game(&self) -> bool
pub fn set_create_game(&mut self, v: RequestCreateGame)
pub fn mut_create_game(&mut self) -> &mut RequestCreateGame
pub fn take_create_game(&mut self) -> RequestCreateGame
pub fn get_join_game(&self) -> &RequestJoinGame
pub fn clear_join_game(&mut self)
pub fn has_join_game(&self) -> bool
pub fn set_join_game(&mut self, v: RequestJoinGame)
pub fn mut_join_game(&mut self) -> &mut RequestJoinGame
pub fn take_join_game(&mut self) -> RequestJoinGame
pub fn get_restart_game(&self) -> &RequestRestartGame
pub fn clear_restart_game(&mut self)
pub fn has_restart_game(&self) -> bool
pub fn set_restart_game(&mut self, v: RequestRestartGame)
pub fn mut_restart_game(&mut self) -> &mut RequestRestartGame
pub fn take_restart_game(&mut self) -> RequestRestartGame
pub fn get_start_replay(&self) -> &RequestStartReplay
pub fn clear_start_replay(&mut self)
pub fn has_start_replay(&self) -> bool
pub fn set_start_replay(&mut self, v: RequestStartReplay)
pub fn mut_start_replay(&mut self) -> &mut RequestStartReplay
pub fn take_start_replay(&mut self) -> RequestStartReplay
pub fn get_leave_game(&self) -> &RequestLeaveGame
pub fn clear_leave_game(&mut self)
pub fn has_leave_game(&self) -> bool
pub fn set_leave_game(&mut self, v: RequestLeaveGame)
pub fn mut_leave_game(&mut self) -> &mut RequestLeaveGame
pub fn take_leave_game(&mut self) -> RequestLeaveGame
pub fn get_quick_save(&self) -> &RequestQuickSave
pub fn clear_quick_save(&mut self)
pub fn has_quick_save(&self) -> bool
pub fn set_quick_save(&mut self, v: RequestQuickSave)
pub fn mut_quick_save(&mut self) -> &mut RequestQuickSave
pub fn take_quick_save(&mut self) -> RequestQuickSave
pub fn get_quick_load(&self) -> &RequestQuickLoad
pub fn clear_quick_load(&mut self)
pub fn has_quick_load(&self) -> bool
pub fn set_quick_load(&mut self, v: RequestQuickLoad)
pub fn mut_quick_load(&mut self) -> &mut RequestQuickLoad
pub fn take_quick_load(&mut self) -> RequestQuickLoad
pub fn get_quit(&self) -> &RequestQuit
pub fn clear_quit(&mut self)
pub fn has_quit(&self) -> bool
pub fn set_quit(&mut self, v: RequestQuit)
pub fn mut_quit(&mut self) -> &mut RequestQuit
pub fn take_quit(&mut self) -> RequestQuit
pub fn get_game_info(&self) -> &RequestGameInfo
pub fn clear_game_info(&mut self)
pub fn has_game_info(&self) -> bool
pub fn set_game_info(&mut self, v: RequestGameInfo)
pub fn mut_game_info(&mut self) -> &mut RequestGameInfo
pub fn take_game_info(&mut self) -> RequestGameInfo
pub fn get_observation(&self) -> &RequestObservation
pub fn clear_observation(&mut self)
pub fn has_observation(&self) -> bool
pub fn set_observation(&mut self, v: RequestObservation)
pub fn mut_observation(&mut self) -> &mut RequestObservation
pub fn take_observation(&mut self) -> RequestObservation
pub fn get_action(&self) -> &RequestAction
pub fn clear_action(&mut self)
pub fn has_action(&self) -> bool
pub fn set_action(&mut self, v: RequestAction)
pub fn mut_action(&mut self) -> &mut RequestAction
pub fn take_action(&mut self) -> RequestAction
pub fn get_obs_action(&self) -> &RequestObserverAction
pub fn clear_obs_action(&mut self)
pub fn has_obs_action(&self) -> bool
pub fn set_obs_action(&mut self, v: RequestObserverAction)
pub fn mut_obs_action(&mut self) -> &mut RequestObserverAction
pub fn take_obs_action(&mut self) -> RequestObserverAction
pub fn get_step(&self) -> &RequestStep
pub fn clear_step(&mut self)
pub fn has_step(&self) -> bool
pub fn set_step(&mut self, v: RequestStep)
pub fn mut_step(&mut self) -> &mut RequestStep
pub fn take_step(&mut self) -> RequestStep
pub fn get_data(&self) -> &RequestData
pub fn clear_data(&mut self)
pub fn has_data(&self) -> bool
pub fn set_data(&mut self, v: RequestData)
pub fn mut_data(&mut self) -> &mut RequestData
pub fn take_data(&mut self) -> RequestData
pub fn get_query(&self) -> &RequestQuery
pub fn clear_query(&mut self)
pub fn has_query(&self) -> bool
pub fn set_query(&mut self, v: RequestQuery)
pub fn mut_query(&mut self) -> &mut RequestQuery
pub fn take_query(&mut self) -> RequestQuery
pub fn get_save_replay(&self) -> &RequestSaveReplay
pub fn clear_save_replay(&mut self)
pub fn has_save_replay(&self) -> bool
pub fn set_save_replay(&mut self, v: RequestSaveReplay)
pub fn mut_save_replay(&mut self) -> &mut RequestSaveReplay
pub fn take_save_replay(&mut self) -> RequestSaveReplay
pub fn get_map_command(&self) -> &RequestMapCommand
pub fn clear_map_command(&mut self)
pub fn has_map_command(&self) -> bool
pub fn set_map_command(&mut self, v: RequestMapCommand)
pub fn mut_map_command(&mut self) -> &mut RequestMapCommand
pub fn take_map_command(&mut self) -> RequestMapCommand
pub fn get_replay_info(&self) -> &RequestReplayInfo
pub fn clear_replay_info(&mut self)
pub fn has_replay_info(&self) -> bool
pub fn set_replay_info(&mut self, v: RequestReplayInfo)
pub fn mut_replay_info(&mut self) -> &mut RequestReplayInfo
pub fn take_replay_info(&mut self) -> RequestReplayInfo
pub fn get_available_maps(&self) -> &RequestAvailableMaps
pub fn clear_available_maps(&mut self)
pub fn has_available_maps(&self) -> bool
pub fn set_available_maps(&mut self, v: RequestAvailableMaps)
pub fn mut_available_maps(&mut self) -> &mut RequestAvailableMaps
pub fn take_available_maps(&mut self) -> RequestAvailableMaps
pub fn get_save_map(&self) -> &RequestSaveMap
pub fn clear_save_map(&mut self)
pub fn has_save_map(&self) -> bool
pub fn set_save_map(&mut self, v: RequestSaveMap)
pub fn mut_save_map(&mut self) -> &mut RequestSaveMap
pub fn take_save_map(&mut self) -> RequestSaveMap
pub fn get_ping(&self) -> &RequestPing
pub fn clear_ping(&mut self)
pub fn has_ping(&self) -> bool
pub fn set_ping(&mut self, v: RequestPing)
pub fn mut_ping(&mut self) -> &mut RequestPing
pub fn take_ping(&mut self) -> RequestPing
pub fn get_debug(&self) -> &RequestDebug
pub fn clear_debug(&mut self)
pub fn has_debug(&self) -> bool
pub fn set_debug(&mut self, v: RequestDebug)
pub fn mut_debug(&mut self) -> &mut RequestDebug
pub fn take_debug(&mut self) -> RequestDebug
pub fn get_id(&self) -> u32
pub fn clear_id(&mut self)
pub fn has_id(&self) -> bool
pub fn set_id(&mut self, v: u32)
Trait Implementations§
Source§impl Message for Request
impl Message for Request
Source§fn is_initialized(&self) -> bool
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<'_>,
) -> Result<(), ProtobufError>
fn merge_from( &mut self, is: &mut CodedInputStream<'_>, ) -> Result<(), ProtobufError>
Update this message object with fields read from given stream.
Source§fn compute_size(&self) -> u32
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<'_>,
) -> Result<(), ProtobufError>
fn write_to_with_cached_sizes( &self, os: &mut CodedOutputStream<'_>, ) -> Result<(), ProtobufError>
Write message to the stream. Read more
Source§fn get_cached_size(&self) -> u32
fn get_cached_size(&self) -> u32
Get size previously computed by
compute_size
.Source§fn get_unknown_fields(&self) -> &UnknownFields
fn get_unknown_fields(&self) -> &UnknownFields
Get a reference to unknown fields.
Source§fn mut_unknown_fields(&mut self) -> &mut UnknownFields
fn mut_unknown_fields(&mut self) -> &mut UnknownFields
Get a mutable reference to unknown fields.
Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
View self as mutable
Any
.Source§fn descriptor(&self) -> &'static MessageDescriptor
fn descriptor(&self) -> &'static MessageDescriptor
Message descriptor for this message, used for reflection.
Source§fn descriptor_static() -> &'static MessageDescriptor
fn descriptor_static() -> &'static MessageDescriptor
Get message descriptor for message type. Read more
Source§fn default_instance() -> &'static Request
fn default_instance() -> &'static Request
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,
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>
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>
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>
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>
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,
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,
fn parse_from_bytes(bytes: &[u8]) -> Result<Self, ProtobufError>where
Self: Sized,
Parse message from byte array.
Source§fn check_initialized(&self) -> Result<(), ProtobufError>
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>
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>
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>
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>
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>
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§impl ProtobufValue for Request
impl ProtobufValue for Request
Source§fn as_ref(&self) -> ReflectValueRef<'_>
fn as_ref(&self) -> ReflectValueRef<'_>
As ref
Source§fn is_non_zero(&self) -> bool
fn is_non_zero(&self) -> bool
Is value non-zero?
Source§fn as_ref_copy(&self) -> ReflectValueRef<'static>
fn as_ref_copy(&self) -> ReflectValueRef<'static>
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl !Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more