pub struct ContextDomain {
pub time: Option<TimeContext>,
pub facility: Option<FacilityContext>,
pub weather: Option<WeatherContext>,
pub traffic: Option<TrafficContext>,
}Expand description
Context domain containing environmental and temporal context.
Fields§
§time: Option<TimeContext>Time context
facility: Option<FacilityContext>Facility context
weather: Option<WeatherContext>Weather context
traffic: Option<TrafficContext>Traffic context
Implementations§
Source§impl ContextDomain
impl ContextDomain
Sourcepub fn with_facility(facility: FacilityContext) -> Self
pub fn with_facility(facility: FacilityContext) -> Self
Create with facility context.
Sourcepub fn with_time(self, time: TimeContext) -> Self
pub fn with_time(self, time: TimeContext) -> Self
Builder to add time context.
Sourcepub fn with_weather(self, weather: WeatherContext) -> Self
pub fn with_weather(self, weather: WeatherContext) -> Self
Builder to add weather context.
Trait Implementations§
Source§impl Clone for ContextDomain
impl Clone for ContextDomain
Source§fn clone(&self) -> ContextDomain
fn clone(&self) -> ContextDomain
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 Debug for ContextDomain
impl Debug for ContextDomain
Source§impl Default for ContextDomain
impl Default for ContextDomain
Source§fn default() -> ContextDomain
fn default() -> ContextDomain
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ContextDomain
impl<'de> Deserialize<'de> for ContextDomain
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
Auto Trait Implementations§
impl Freeze for ContextDomain
impl RefUnwindSafe for ContextDomain
impl Send for ContextDomain
impl Sync for ContextDomain
impl Unpin for ContextDomain
impl UnwindSafe for ContextDomain
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