Struct Cot

pub struct Cot {
    pub cot: CursorOnTarget,
    /* private fields */
}

Fields§

§cot: CursorOnTarget

Implementations§

§

impl Cot

pub fn get_takv() -> String

pub fn new( cot: CursorOnTarget, remarks: Option<String>, callsign: String, military: bool, squawk: Option<String>, altitude: Option<f64>, speed: Option<f64>, battery: Option<i32>, course: Option<f64>, vertical_rate: Option<f64>, status: Option<String>, last_seen: Option<u64>, fileshare: Option<FileShare>, ) -> Self

pub fn generate_uid() -> String

Generate a unique identifier

§Returns
  • String - Unique identifier sting as a UUID V4
§Example
use cot_rs::cot_base::CursorOnTarget;
let uid = CursorOnTarget::generate_uid();

Trait Implementations§

§

impl Debug for Cot

§

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

Formats the value using the given formatter. Read more
§

impl Default for Cot

§

fn default() -> Self

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

impl Sendable for Cot

§

fn modify_field(&mut self, field: &str, value: &str)

modify a field

§Arguments
  • field - The field to modify
  • value - The value to set
§Example
use cot_rs::cot::Cot;
use cot_rs::cot_base::CursorOnTarget;
let mut cot = Cot::default();
cot.modify_field("callsign", "Barrambin II");
§

fn update_xml(&mut self)

§

fn get_cot(&self) -> CursorOnTarget

Auto Trait Implementations§

§

impl Freeze for Cot

§

impl RefUnwindSafe for Cot

§

impl Send for Cot

§

impl Sync for Cot

§

impl Unpin for Cot

§

impl UnwindSafe for Cot

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> 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, 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.