Struct CursorOnTarget

pub struct CursorOnTarget {
    pub uid: String,
    pub stale_time: Option<i32>,
    pub type_string: Option<String>,
    pub how_string: String,
    pub access: Option<String>,
    pub point: Point,
    pub detail: Option<String>,
    /* private fields */
}
Expand description

Cursor on Target message

  • uid - Unique identifier is some otherwise will create UUID V4
  • stale_time - Stale time in seconds, if some. Otherwise default
  • type_string - Type string
  • how_string - How string
  • access - Access i.e. “UNCLASSIFIED”
  • point - Point data includes GPS coordinates
  • detail - Detail XML
  • config - Configuration

Fields§

§uid: String§stale_time: Option<i32>§type_string: Option<String>§how_string: String§access: Option<String>§point: Point§detail: Option<String>

Implementations§

§

impl CursorOnTarget

pub const HAE_NONE: f64 = 9999999f64

pub const CE_NONE: f64 = 9999999f64

pub const LE_NONE: f64 = 9999999f64

pub fn new( uid: String, stale_time: Option<i32>, type_string: Option<String>, how_string: String, access: Option<String>, point: Point, ) -> Self

pub fn get_xml_detail(&self) -> String

pub fn set_xml_detail(&mut self, detail: String)

pub fn get_xml(&mut self) -> String

pub fn get_xml_bytes(&mut self) -> Vec<u8>

pub fn delete(uid: String) -> String

Delete a CoT message

§Arguments
  • uid - Unique identifier of the CoT message to delete
§Returns
  • String - XML text
§Example
<?xml version="1.0" standalone="yes"?>
<event start="2012-01-01T00:00:00Z" time="2012-01-01T00:00:00Z" stale="2020-01-01T00:00:00Z" how="m-g" type="t-x-d-d" uid="does-not-matter-must-be-unique" version="2.0">
    <detail>
        <link uid="the-uid-of-the-map-item-to-remove" relation="none" type="none"/>
        <__forcedelete/>
    </detail>
<point lat="0.0" lon="0.0" ce="9999999" le="9999999" hae="9999999"/>
</event>

pub fn get_uid(&self) -> String

pub fn object_hash<T: Hash>(t: T) -> u64

Hash a generic type

§Arguments
  • t - A generic type that implements std::hash::Hash
§Returns
  • A u64
§Example
let hash = CursorOnTarget::object_hash("Hello World");

Trait Implementations§

§

impl Clone for CursorOnTarget

§

fn clone(&self) -> CursorOnTarget

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for CursorOnTarget

§

fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult

Formats the value using the given formatter. Read more
§

impl Default for CursorOnTarget

§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.