pub struct MarkerInfo {
pub uid: String,
pub marker_type: String,
pub lat: f64,
pub lon: f64,
pub hae: Option<f64>,
pub ts: i64,
pub callsign: Option<String>,
pub color: Option<i32>,
pub cell_id: Option<String>,
pub deleted: bool,
}Expand description
Operator-placed map marker — the typed shape every peer renders in the Peat Markers panel and on the MapView (ADR-035 Universal Document transport, “markers” collection).
Origin-agnostic: this struct is what the local doc store holds,
independent of which peer published it. The plugin’s mental model
is “created somewhere, synced everywhere, displayed consistently”
— MarkerInfo is the synced shape, the wire transport is
invisible above this surface.
Wire-key parity with the JSON the prior raw-JSON publish path
produced (uid, type, lat, lon, hae, ts, callsign, color), so the
migration to the typed API is wire-compatible: docs published by
the old raw-JSON path round-trip cleanly into MarkerInfo.
Fields§
§uid: StringUnique marker identifier — the operator-placed UID, typically
UUID-shaped (e.g. 4ae7b0a0-1995-447c-...).
marker_type: StringCoT 2525-style type code (e.g. "a-f-G-U-C" for friendly
ground unit combat, "b-m-p-w" for waypoint).
lat: f64Latitude (WGS84).
lon: f64Longitude (WGS84).
hae: Option<f64>Height above ellipsoid (meters). None when the publisher
had no altitude fix; receivers render at ground level.
ts: i64Unix epoch milliseconds — the publisher’s clock at marker drop time. Receivers DON’T treat this as a presence-staleness timestamp (markers persist until deleted, unlike nodes); it’s purely “when did the operator drop this pin.”
callsign: Option<String>Operator callsign of the publisher. None when the publisher
didn’t stamp it.
color: Option<i32>Marker color (consumer-defined encoding — commonly a 32-bit
ARGB integer, sign-extended). None when default coloring
applies.
cell_id: Option<String>Cell membership (organizational unit within mesh), if scoped.
None for cell-agnostic markers.
deleted: boolSoft-delete sentinel. When true, the marker is a tombstone
— peers sync the deletion (CRDT keeps the entry so concurrent
edits resolve consistently) but consumer UIs filter it out
of “current markers” views. peat-mesh’s fan-out today does
NOT propagate ChangeEvent::Removed (Slice 2 work), so the
soft-delete-sentinel pattern is the only way to communicate
deletions across the mesh until that lands. Wire key: _deleted
(matches the peat-mesh transport::document_codec synthesis
convention from PR #103).
Trait Implementations§
Source§impl Clone for MarkerInfo
impl Clone for MarkerInfo
Source§fn clone(&self) -> MarkerInfo
fn clone(&self) -> MarkerInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<UT> ConvertError<UT> for MarkerInfo
impl<UT> ConvertError<UT> for MarkerInfo
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
Source§impl Debug for MarkerInfo
impl Debug for MarkerInfo
Source§impl<UT> FfiConverter<UT> for MarkerInfo
impl<UT> FfiConverter<UT> for MarkerInfo
Source§const TYPE_ID_META: MetadataBuffer
const TYPE_ID_META: MetadataBuffer
Source§type FfiType = RustBuffer
type FfiType = RustBuffer
Source§fn lower(v: Self) -> RustBuffer
fn lower(v: Self) -> RustBuffer
Source§fn try_lift(buf: RustBuffer) -> Result<Self>
fn try_lift(buf: RustBuffer) -> Result<Self>
Source§impl<UT> Lift<UT> for MarkerInfo
impl<UT> Lift<UT> for MarkerInfo
Source§impl<UT> LiftRef<UT> for MarkerInfo
impl<UT> LiftRef<UT> for MarkerInfo
type LiftType = MarkerInfo
Source§impl<UT> LiftReturn<UT> for MarkerInfo
impl<UT> LiftReturn<UT> for MarkerInfo
Source§type ReturnType = <MarkerInfo as Lift<UT>>::FfiType
type ReturnType = <MarkerInfo as Lift<UT>>::FfiType
Source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
Source§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
Source§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
Source§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
Source§impl<UT> Lower<UT> for MarkerInfo
impl<UT> Lower<UT> for MarkerInfo
type FfiType = <MarkerInfo as FfiConverter<UT>>::FfiType
fn lower(obj: Self) -> Self::FfiType
fn write(obj: Self, buf: &mut Vec<u8>)
Source§fn lower_into_rust_buffer(obj: Self) -> RustBuffer
fn lower_into_rust_buffer(obj: Self) -> RustBuffer
Source§impl<UT> LowerError<UT> for MarkerInfo
impl<UT> LowerError<UT> for MarkerInfo
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for MarkerInfo
impl<UT> LowerReturn<UT> for MarkerInfo
Source§type ReturnType = <MarkerInfo as Lower<UT>>::FfiType
type ReturnType = <MarkerInfo as Lower<UT>>::FfiType
Source§fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
Source§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl<UT> TypeId<UT> for MarkerInfo
impl<UT> TypeId<UT> for MarkerInfo
Auto Trait Implementations§
impl Freeze for MarkerInfo
impl RefUnwindSafe for MarkerInfo
impl Send for MarkerInfo
impl Sync for MarkerInfo
impl Unpin for MarkerInfo
impl UnsafeUnpin for MarkerInfo
impl UnwindSafe for MarkerInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
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>
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>
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