pub struct RegionDetails<'l> {
pub code: &'l str,
pub name: &'l str,
pub city: City<'l>,
}Available on crate feature
regions only.Expand description
Attributes of a known Region.
use flytrap::{Region, RegionDetails};
let RegionDetails { code, name, city } = Region::Atlanta.details();
assert_eq!(code, "atl");
assert_eq!(city.name, "Atlanta");
assert_eq!(name, "Atlanta, Georgia (US)");Fields§
§code: &'l str§name: &'l str§city: City<'l>Trait Implementations§
Source§impl<'l> Clone for RegionDetails<'l>
impl<'l> Clone for RegionDetails<'l>
Source§fn clone(&self) -> RegionDetails<'l>
fn clone(&self) -> RegionDetails<'l>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'l> Debug for RegionDetails<'l>
impl<'l> Debug for RegionDetails<'l>
Source§impl<'de: 'l, 'l> Deserialize<'de> for RegionDetails<'l>
impl<'de: 'l, 'l> Deserialize<'de> for RegionDetails<'l>
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<'l> PartialEq for RegionDetails<'l>
impl<'l> PartialEq for RegionDetails<'l>
Source§impl<'l> Serialize for RegionDetails<'l>
impl<'l> Serialize for RegionDetails<'l>
impl<'l> Copy for RegionDetails<'l>
impl<'l> Eq for RegionDetails<'l>
impl<'l> StructuralPartialEq for RegionDetails<'l>
Auto Trait Implementations§
impl<'l> Freeze for RegionDetails<'l>
impl<'l> RefUnwindSafe for RegionDetails<'l>
impl<'l> Send for RegionDetails<'l>
impl<'l> Sync for RegionDetails<'l>
impl<'l> Unpin for RegionDetails<'l>
impl<'l> UnwindSafe for RegionDetails<'l>
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.