pub struct CotTypeMapper { /* private fields */ }Expand description
Mapper for converting Peat classifications to CoT types
Implementations§
Source§impl CotTypeMapper
impl CotTypeMapper
Sourcepub fn add_mapping(&mut self, classification: &str, cot_type: &str)
pub fn add_mapping(&mut self, classification: &str, cot_type: &str)
Add a custom mapping
Sourcepub fn map(&self, classification: &str, affiliation: Affiliation) -> CotType
pub fn map(&self, classification: &str, affiliation: Affiliation) -> CotType
Map a classification string to CoT type
Sourcepub fn map_entity(
&self,
entity: &EntityClassification,
affiliation: Affiliation,
) -> CotType
pub fn map_entity( &self, entity: &EntityClassification, affiliation: Affiliation, ) -> CotType
Map an entity classification to CoT type
Sourcepub fn map_platform(
&self,
platform_type: &str,
affiliation: Affiliation,
) -> CotType
pub fn map_platform( &self, platform_type: &str, affiliation: Affiliation, ) -> CotType
Map a Peat platform type to CoT type
Sourcepub fn handoff_type() -> CotType
pub fn handoff_type() -> CotType
Get the CoT type for a handoff event
Sourcepub fn geofence_type() -> CotType
pub fn geofence_type() -> CotType
Get the CoT type for a geofence/ROZ
Sourcepub fn mission_tasking_type() -> CotType
pub fn mission_tasking_type() -> CotType
Get the CoT type for a mission tasking
Sourcepub fn cell_marker_type(affiliation: Affiliation) -> CotType
pub fn cell_marker_type(affiliation: Affiliation) -> CotType
Get the CoT type for a cell/team marker
Sourcepub fn formation_marker_type(affiliation: Affiliation) -> CotType
pub fn formation_marker_type(affiliation: Affiliation) -> CotType
Get the CoT type for a formation marker
Trait Implementations§
Source§impl Clone for CotTypeMapper
impl Clone for CotTypeMapper
Source§fn clone(&self) -> CotTypeMapper
fn clone(&self) -> CotTypeMapper
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 CotTypeMapper
impl Debug for CotTypeMapper
Auto Trait Implementations§
impl Freeze for CotTypeMapper
impl RefUnwindSafe for CotTypeMapper
impl Send for CotTypeMapper
impl Sync for CotTypeMapper
impl Unpin for CotTypeMapper
impl UnsafeUnpin for CotTypeMapper
impl UnwindSafe for CotTypeMapper
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more