#[non_exhaustive]pub struct LicensePlate {
pub country_code: String,
pub last_character: String,
/* private fields */
}Expand description
The license plate information of the Vehicle. To avoid storing personally-identifiable information, only the minimum information about the license plate is stored as part of the entity.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.country_code: StringRequired. CLDR Country/Region Code. For example, US for United States,
or IN for India.
last_character: StringThe last digit of the license plate or “-1” to denote no numeric value is present in the license plate.
- “ABC 1234” -> “4”
- “AB 123 CD” -> “3”
- “ABCDEF” -> “-1”
Implementations§
Source§impl LicensePlate
impl LicensePlate
Sourcepub fn set_country_code<T: Into<String>>(self, v: T) -> Self
pub fn set_country_code<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_last_character<T: Into<String>>(self, v: T) -> Self
pub fn set_last_character<T: Into<String>>(self, v: T) -> Self
Sets the value of last_character.
§Example
ⓘ
let x = LicensePlate::new().set_last_character("example");Trait Implementations§
Source§impl Clone for LicensePlate
impl Clone for LicensePlate
Source§fn clone(&self) -> LicensePlate
fn clone(&self) -> LicensePlate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LicensePlate
impl Debug for LicensePlate
Source§impl Default for LicensePlate
impl Default for LicensePlate
Source§fn default() -> LicensePlate
fn default() -> LicensePlate
Returns the “default value” for a type. Read more
Source§impl Message for LicensePlate
impl Message for LicensePlate
Source§impl PartialEq for LicensePlate
impl PartialEq for LicensePlate
impl StructuralPartialEq for LicensePlate
Auto Trait Implementations§
impl Freeze for LicensePlate
impl RefUnwindSafe for LicensePlate
impl Send for LicensePlate
impl Sync for LicensePlate
impl Unpin for LicensePlate
impl UnsafeUnpin for LicensePlate
impl UnwindSafe for LicensePlate
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