Struct spacetraders::shared::Ship[][src]

pub struct Ship {
Show fields pub id: String, pub location: Option<String>, pub cargo: Vec<Cargo>, pub space_available: i32, pub ship_type: String, pub class: String, pub max_cargo: i32, pub speed: i32, pub manufacturer: String, pub plating: i32, pub weapons: i32, pub x: Option<i32>, pub y: Option<i32>, pub flight_plan_id: Option<String>,
}
Expand description

A representation of a users ship

Fields

id: String

The ships id

location: Option<String>

The current location of the ship or None if the ship is in transit

cargo: Vec<Cargo>

Any cargo within the ship

space_available: i32

The volume available in the ships cargo

ship_type: String

The type of the ship

class: String

The class of the ship

max_cargo: i32

The maximum cargo volume of the ship

speed: i32

The speed rating of the ship

manufacturer: String

The manufacturer of the ship

plating: i32

The defensive rating of the ship

weapons: i32

The offensive rating of the ship

x: Option<i32>

The ships current X coordinate

y: Option<i32>

The ships current Y coordinate

flight_plan_id: Option<String>

The ships current flight plan

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

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

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.