#[repr(C)]
#[repr(align(4))]
pub struct IpcSharedMemory {
Show 14 fields pub server_config: IpcServerConfig, pub self_info: IpcSelfInfo, pub food_count: u32, pub food_info: [IpcFoodInfo; 52428], pub bot_count: u32, pub bot_info: [IpcBotInfo; 1024], pub segment_count: u32, pub segment_info: [IpcSegmentInfo; 26214], pub color_count: u32, pub colors: [IpcColor; 1024], pub log_data: [u8; 1024], pub face_id: u32, pub dog_tag_id: u32, pub persistent_data: [u8; 4096],
}
Expand description

Shared memory structure.

This structure represents the contents of the memory the bot shares with the gameserver.

Fields

server_config: IpcServerConfig

Information about the world and server configuration.

self_info: IpcSelfInfo

Information about your snake (updated every frame).

food_count: u32

Number of items used in foodInfo.

food_info: [IpcFoodInfo; 52428]

List of food items seen by the snake.

bot_count: u32

Number of items used in botInfo.

bot_info: [IpcBotInfo; 1024]

List of bots related to segments in segmentInfo.

segment_count: u32

Number of items used in segmentInfo.

segment_info: [IpcSegmentInfo; 26214]

List of segments seen by the snake.

color_count: u32

Number of items used in colors.

colors: [IpcColor; 1024]

Colors to set for this snake.

log_data: [u8; 1024]

Log data for the current frame. May contain multiple lines.

face_id: u32

Select a face for your snake (not used yet).

dog_tag_id: u32

Select a dog tag for your snake (not used yet).

persistent_data: [u8; 4096]

Persistent data: will be saved after your snake dies and restored when it respawns

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.