pub struct CellularLogicGraph {
pub cells: Vec<LogicalCellDescriptor>,
pub message_queue: Vec<InterCellMessage>,
}Expand description
Manager tracking the topological network of 42 MiB cellular logical units.
Fields§
§cells: Vec<LogicalCellDescriptor>§message_queue: Vec<InterCellMessage>Implementations§
Source§impl CellularLogicGraph
impl CellularLogicGraph
Sourcepub fn register_cell(
&mut self,
id: CellId,
name: impl Into<String>,
center_x: f64,
center_z: f64,
radius_meters: f64,
) -> usize
pub fn register_cell( &mut self, id: CellId, name: impl Into<String>, center_x: f64, center_z: f64, radius_meters: f64, ) -> usize
Register a new logical cell in the graph.
Sourcepub fn link_neighbors(&mut self, a: CellId, b: CellId) -> bool
pub fn link_neighbors(&mut self, a: CellId, b: CellId) -> bool
Link two cells as topological neighbors.
Sourcepub fn route_message(&mut self, msg: InterCellMessage) -> bool
pub fn route_message(&mut self, msg: InterCellMessage) -> bool
Enqueue an inter-cell routing message. Enforces valid PermissiveRoutingLane bits.
Sourcepub fn drain_messages_for(
&mut self,
target_cell: CellId,
) -> Vec<InterCellMessage>
pub fn drain_messages_for( &mut self, target_cell: CellId, ) -> Vec<InterCellMessage>
Drain pending messages destined for a specific cell.
Trait Implementations§
Source§impl Clone for CellularLogicGraph
impl Clone for CellularLogicGraph
Source§impl Debug for CellularLogicGraph
impl Debug for CellularLogicGraph
Source§impl Default for CellularLogicGraph
impl Default for CellularLogicGraph
Source§impl<'de> Deserialize<'de> for CellularLogicGraph
impl<'de> Deserialize<'de> for CellularLogicGraph
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CellularLogicGraph
impl RefUnwindSafe for CellularLogicGraph
impl Send for CellularLogicGraph
impl Sync for CellularLogicGraph
impl Unpin for CellularLogicGraph
impl UnsafeUnpin for CellularLogicGraph
impl UnwindSafe for CellularLogicGraph
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.