Struct svc_assets::rest::structs::Aircraft
source · pub struct Aircraft {
pub basics: Basics,
pub manufacturer: String,
pub model: String,
pub serial_number: String,
pub registration_number: String,
pub description: Option<String>,
pub max_payload_kg: f64,
pub max_range_km: f64,
pub last_maintenance: Option<DateTime<Utc>>,
pub next_maintenance: Option<DateTime<Utc>>,
pub hangar_id: Option<String>,
}
Expand description
A struct representing an aircraft.
Fields§
§basics: Basics
§manufacturer: String
The aircraft’s manufacturer.
TODO(R4): For now we can just say “Boeing”, “Airbus”, etc. Later, we can a struct for this and store the manufacturer’s name, logo, etc.
model: String
§serial_number: String
§registration_number: String
The aircraft’s registration number.
In the US, this is the N number.
This is a unique identifier for the aircraft that can be used to look up information about the aircraft from national aviation authorities like the FAA.
description: Option<String>
§max_payload_kg: f64
§max_range_km: f64
§last_maintenance: Option<DateTime<Utc>>
§next_maintenance: Option<DateTime<Utc>>
§hangar_id: Option<String>
Implementations§
Trait Implementations§
source§impl AssetsInfo for Aircraft
impl AssetsInfo for Aircraft
source§fn created_at(&self) -> DateTime<Utc>
fn created_at(&self) -> DateTime<Utc>
Get the asset’s creation time.
source§fn updated_at(&self) -> DateTime<Utc>
fn updated_at(&self) -> DateTime<Utc>
Get the asset’s last update time. If the asset has never been
updated, this will return None.
source§fn is_grouped(&self) -> bool
fn is_grouped(&self) -> bool
Check if the asset is grouped.
source§fn whitelist(&self) -> Result<Vec<Uuid>, Error>
fn whitelist(&self) -> Result<Vec<Uuid>, Error>
Get the list of clients that have access to the asset.
source§fn status(&self) -> AssetStatus
fn status(&self) -> AssetStatus
Get the status of the asset.
source§impl<'de> Deserialize<'de> for Aircraft
impl<'de> Deserialize<'de> for Aircraft
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl IntoParams for Aircraft
impl IntoParams for Aircraft
source§impl PartialEq<Aircraft> for Aircraft
impl PartialEq<Aircraft> for Aircraft
source§impl<'__s> ToSchema<'__s> for Aircraft
impl<'__s> ToSchema<'__s> for Aircraft
impl StructuralPartialEq for Aircraft
Auto Trait Implementations§
impl RefUnwindSafe for Aircraft
impl Send for Aircraft
impl Sync for Aircraft
impl Unpin for Aircraft
impl UnwindSafe for Aircraft
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request