pub struct CotEncoder { /* private fields */ }Expand description
Encoder for converting Peat messages to CoT XML
Implementations§
Source§impl CotEncoder
impl CotEncoder
Sourcepub fn with_config(config: CotEncoderConfig) -> Self
pub fn with_config(config: CotEncoderConfig) -> Self
Create encoder with custom configuration
Sourcepub fn type_mapper_mut(&mut self) -> &mut CotTypeMapper
pub fn type_mapper_mut(&mut self) -> &mut CotTypeMapper
Get mutable reference to type mapper for adding custom mappings
Sourcepub fn track_update_to_event(
&self,
track: &TrackUpdate,
) -> Result<CotEvent, CotError>
pub fn track_update_to_event( &self, track: &TrackUpdate, ) -> Result<CotEvent, CotError>
Build a CotEvent from a TrackUpdate
Sourcepub fn encode_track_update(
&self,
track: &TrackUpdate,
) -> Result<String, CotError>
pub fn encode_track_update( &self, track: &TrackUpdate, ) -> Result<String, CotError>
Encode a TrackUpdate to CoT XML
Sourcepub fn capability_to_event(
&self,
cap: &CapabilityAdvertisement,
) -> Result<CotEvent, CotError>
pub fn capability_to_event( &self, cap: &CapabilityAdvertisement, ) -> Result<CotEvent, CotError>
Build a CotEvent from a CapabilityAdvertisement
Sourcepub fn encode_capability_advertisement(
&self,
cap: &CapabilityAdvertisement,
) -> Result<String, CotError>
pub fn encode_capability_advertisement( &self, cap: &CapabilityAdvertisement, ) -> Result<String, CotError>
Encode a CapabilityAdvertisement to CoT XML
Sourcepub fn handoff_to_event(
&self,
handoff: &HandoffMessage,
) -> Result<CotEvent, CotError>
pub fn handoff_to_event( &self, handoff: &HandoffMessage, ) -> Result<CotEvent, CotError>
Build a CotEvent from a HandoffMessage
Sourcepub fn encode_handoff(
&self,
handoff: &HandoffMessage,
) -> Result<String, CotError>
pub fn encode_handoff( &self, handoff: &HandoffMessage, ) -> Result<String, CotError>
Encode a HandoffMessage to CoT XML
Sourcepub fn formation_summary_to_event(
&self,
summary: &FormationCapabilitySummary,
) -> Result<CotEvent, CotError>
pub fn formation_summary_to_event( &self, summary: &FormationCapabilitySummary, ) -> Result<CotEvent, CotError>
Build a CotEvent from a FormationCapabilitySummary
Sourcepub fn encode_formation_summary(
&self,
summary: &FormationCapabilitySummary,
) -> Result<String, CotError>
pub fn encode_formation_summary( &self, summary: &FormationCapabilitySummary, ) -> Result<String, CotError>
Encode a FormationCapabilitySummary to CoT XML
Trait Implementations§
Source§impl Clone for CotEncoder
impl Clone for CotEncoder
Source§fn clone(&self) -> CotEncoder
fn clone(&self) -> CotEncoder
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 CotEncoder
impl Debug for CotEncoder
Auto Trait Implementations§
impl Freeze for CotEncoder
impl RefUnwindSafe for CotEncoder
impl Send for CotEncoder
impl Sync for CotEncoder
impl Unpin for CotEncoder
impl UnsafeUnpin for CotEncoder
impl UnwindSafe for CotEncoder
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