Struct rust_rocket::client::Rocket [] [src]

pub struct Rocket { /* fields omitted */ }

The Rocket type. This contains the connected socket and other fields.

Methods

impl Rocket
[src]

Construct a new Rocket.

This constructs a new rocket and connect to localhost on port 1338.

Errors

If a connection cannot be established, or if the handshake fails. This will raise a RocketErr.

Examples

use rocket::Rocket;

let mut rocket = Rocket::new();

Construct a new Rocket.

This constructs a new rocket and connects to a specified host and port.

Errors

If a connection cannot be established, or if the handshake fails. This will raise a RocketErr.

Examples

use rocket::Rocket;

let mut rocket = Rocket::connect("localhost", 1338);

Get a track by name.

If the track does not yet exist it will be created.

Examples

let track = rocket.get_track_mut("namespace:track");
track.get_value(3.5);

Get Track by name.

If it does not exist, it will panic. You should use get_track_mut instead.

Send a SetRow message.

This changes the current row on the tracker side.

Poll for new events from the tracker.

This polls from events from the tracker. You should call this fairly often your main loop. It is recommended to keep calling this as long as your receive Some(Event).

Examples

while let Some(Event) = rocket.poll_events() {
     match event {
         // Do something with the various events.
         _ => (),
     }
 }

Trait Implementations

impl Debug for Rocket
[src]

Formats the value using the given formatter.