[−][src]Enum screeps_api::websocket::Channel
Different channels one can subscribe to.
Variants
ServerMessages
Server messages (TODO: find message here).
UserCpu
User CPU and memory usage updates. Sent at the end of each tick.
Fields of UserCpu
UserMessages
User message updates. Sent when the user receives any new message.
Fields of UserMessages
UserConversation
Specific conversation alerts. Updates when a new message is received from a particular user.
Fields of UserConversation
UserCredits
User credit alerts. Updates whenever the user's credit changes.
Fields of UserCredits
UserMemoryPath
Memory path alerts. Updates whenever this specific memory path changes.
Fields of UserMemoryPath
UserConsole
Console alerts. Updates at the end of every tick with all console messages during that tick.
Fields of UserConsole
UserActiveBranch
User active branch changes: updates whenever the active branch changes.
Fields of UserActiveBranch
RoomMapView
Room overview updates. Updates at the end of every tick with all room positions for each nondescript type of structure (road, wall, energy, or player owned).
Fields of RoomMapView
RoomDetail
Detailed room updates. Updates at the end of every tick with all room object properties which have changed since the last tick.
Note: this is limited to 2 per user account at a time, and if there are more than 2 room subscriptions active, it is random which 2 will received updates on any given ticks. Rooms which are not updated do receive an error message on "off" ticks.
Fields of RoomDetail
Other
A channel specified by the exact channel id.
Fields of Other
Methods
impl Channel<'static>
[src]
pub fn server_messages() -> Self
[src]
Creates a channel subscribing to server messages.
pub fn room_map_view_ps(room_name: RoomName) -> Self
[src]
Creates a channel subscribing to map-view updates of a room, with no shard.
Warning: creating a channel with a shard name when the server does not have any shards or creating a channel without a shard name on a sharded server will both result in the subscribe silently failing.
pub fn room_detail_ps(room_name: RoomName) -> Self
[src]
Creates a channel subscribing to detailed updates of a room's contents, with no shard.
Note: this is limited to 2 per user account at a time, and if there are more than 2 room subscriptions active, it is random which 2 will received updates on any given ticks. Rooms which are not updated do receive an error message on "off" ticks.
Warning: creating a channel with a shard name when the server does not have any shards or creating a channel without a shard name on a sharded server will both result in the subscribe silently failing.
impl<'a> Channel<'a>
[src]
pub fn room_map_view<T: Into<Cow<'a, str>>>(
room_name: RoomName,
shard_name: Option<T>
) -> Self
[src]
room_name: RoomName,
shard_name: Option<T>
) -> Self
Creates a channel subscribing to map-view updates of a room.
Warning: creating a channel with a shard name when the server does not have any shards or creating a channel without a shard name on a sharded server will both result in the subscribe silently failing.
pub fn room_detail<T: Into<Cow<'a, str>>>(
room_name: RoomName,
shard_name: Option<T>
) -> Self
[src]
room_name: RoomName,
shard_name: Option<T>
) -> Self
Creates a channel subscribing to detailed updates of a room's contents.
Warning: creating a channel with a shard name when the server does not have any shards or creating a channel without a shard name on a sharded server will both result in the subscribe silently failing.
Note: this is limited to 2 per user account at a time, and if there are more than 2 room subscriptions active, it is random which 2 will received updates on any given ticks. Rooms which are not updated do receive an error message on "off" ticks.
pub fn user_cpu<T: Into<Cow<'a, str>>>(user_id: T) -> Self
[src]
Creates a channel subscribing to a user's CPU and memory.
pub fn user_messages<T: Into<Cow<'a, str>>>(user_id: T) -> Self
[src]
Creates a channel subscribing to a user's new message notifications.
pub fn user_conversation<T, U>(user_id: T, target_user_id: U) -> Self where
T: Into<Cow<'a, str>>,
U: Into<Cow<'a, str>>,
[src]
T: Into<Cow<'a, str>>,
U: Into<Cow<'a, str>>,
Creates a channel subscribing to new messages in a user's specific conversation.
pub fn user_credits<T: Into<Cow<'a, str>>>(user_id: T) -> Self
[src]
Creates a channel subscribing to a user's credit count.
pub fn user_memory_path<T, U>(user_id: T, path: U) -> Self where
T: Into<Cow<'a, str>>,
U: Into<Cow<'a, str>>,
[src]
T: Into<Cow<'a, str>>,
U: Into<Cow<'a, str>>,
Creates a channel subscribing to a path in a user's memory.
pub fn user_console<T: Into<Cow<'a, str>>>(user_id: T) -> Self
[src]
Creates a channel subscribing to a user's console output.
pub fn user_active_branch<T: Into<Cow<'a, str>>>(user_id: T) -> Self
[src]
Creates a channel subscribing to when a user's active code branch changes.
pub fn other<T: Into<Cow<'a, str>>>(channel: T) -> Self
[src]
Creates a channel using the fully specified channel name.
Trait Implementations
Auto Trait Implementations
impl<'a> Send for Channel<'a>
impl<'a> Unpin for Channel<'a>
impl<'a> Sync for Channel<'a>
impl<'a> RefUnwindSafe for Channel<'a>
impl<'a> UnwindSafe for Channel<'a>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,