pub struct Driver {
pub driver_id: DriverID,
pub permanent_number: Option<u32>,
pub code: Option<String>,
pub url: Url,
pub given_name: String,
pub family_name: String,
pub date_of_birth: Date,
pub nationality: String,
}Expand description
Holds information about a Formula 1 driver.
Requested via Resource::DriverInfo and returned in Table::Drivers.
Fields§
§driver_id: DriverIDUnique identifier for the driver, e.g. "max_verstappen" for Max Verstappen.
permanent_number: Option<u32>Permanent number associated with the driver, if any, e.g. 33 for Max Verstappen.
Permanent numbers were introduced in the 2014 season, so drivers that raced before then
may not have one, represented by None. Drivers may also have used other numbers at
some point in their career, e.g. when substituting for another driver, when only
participating in free-practice sessions, when using the number 1, etc. The number 1 is
reserved for the previous season’s World Drivers’ Champion, although it is not mandatory for
the driver to run the number. Most notably, Max Verstappen has used the number 1 since
2022, following his titles in 2021, 2022, 2023, and 2024. For more information, see the
List of Formula One driver numbers
code: Option<String>Three-letter code associated with the driver, if any, e.g. "VER" for Max Verstappen.
url: UrlURL to the Wikipedia page for this driver, e.g. for Max Verstappen:
"https://en.wikipedia.org/wiki/Max_Verstappen"
given_name: StringGiven name of the driver, e.g. "Max" for Max Verstappen.
family_name: StringFamily name of the driver, e.g. "Verstappen" for Max Verstappen.
date_of_birth: DateDate of birth of the driver, e.g. 1997-09-30 for Max Verstappen.
nationality: StringNationality of the driver, e.g. "Dutch" for Max Verstappen.
Implementations§
Source§impl Driver
impl Driver
Sourcepub fn full_name(&self) -> String
pub fn full_name(&self) -> String
Returns the full name of this Driver, i.e. the concatenation of
given_name and family_name.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Driver
impl<'de> Deserialize<'de> for Driver
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>,
Source§impl TableInnerList for Driver
impl TableInnerList for Driver
Source§fn try_into_inner_from(table: Table) -> Result<Vec<Self>>
fn try_into_inner_from(table: Table) -> Result<Vec<Self>>
Table variant for this
TableInnerList, e.g. a Vec<Season> from the Table::Seasons variant for
Season.Source§fn try_as_inner_from(table: &Table) -> Result<&Vec<Self>>
fn try_as_inner_from(table: &Table) -> Result<&Vec<Self>>
Table variant for this
TableInnerList, e.g. a &Vec<Season> from the Table::Seasons
variant.Source§impl ToResource for Driver
impl ToResource for Driver
Source§fn to_resource(filters: Filters) -> Resource
fn to_resource(filters: Filters) -> Resource
Filters with the corresponding Resource variant for this ToResource,
e.g. Resource::SeasonList for Season, Resource::DriverInfo for Driver, etc.impl Eq for Driver
impl StructuralPartialEq for Driver
Auto Trait Implementations§
impl Freeze for Driver
impl RefUnwindSafe for Driver
impl Send for Driver
impl Sync for Driver
impl Unpin for Driver
impl UnwindSafe for Driver
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.