pub struct FluxManager { /* private fields */ }Expand description
FLUX transference manager
Implementations§
Source§impl FluxManager
impl FluxManager
pub fn new() -> Self
Sourcepub fn create_flux(
&mut self,
source: RoomId,
target: RoomId,
timestamp: f64,
payload: TransferencePayload,
zeitgeist: Zeitgeist,
) -> FluxTransference
pub fn create_flux( &mut self, source: RoomId, target: RoomId, timestamp: f64, payload: TransferencePayload, zeitgeist: Zeitgeist, ) -> FluxTransference
Create a FLUX transference from source to target
Sourcepub fn send_flux(&mut self, flux: FluxTransference)
pub fn send_flux(&mut self, flux: FluxTransference)
Send a FLUX transference (queue it)
Sourcepub fn recv_flux_for(&mut self, target: &RoomId) -> Vec<FluxTransference>
pub fn recv_flux_for(&mut self, target: &RoomId) -> Vec<FluxTransference>
Receive pending FLUX transferences for a target room
Sourcepub fn recv_flux(&mut self) -> Option<FluxTransference>
pub fn recv_flux(&mut self) -> Option<FluxTransference>
Receive any pending FLUX transference
Sourcepub fn update_parity(
&mut self,
room: &RoomId,
zeitgeist: &Zeitgeist,
timestamp: f64,
)
pub fn update_parity( &mut self, room: &RoomId, zeitgeist: &Zeitgeist, timestamp: f64, )
Update parity state for a room (CONSTRAINT 7)
Sourcepub fn check_parity(&self, room: &RoomId) -> bool
pub fn check_parity(&self, room: &RoomId) -> bool
Check if a room has valid parity (CONSTRAINT 7)
Sourcepub fn encode_zeitgeist(zeitgeist: &Zeitgeist) -> Vec<u8> ⓘ
pub fn encode_zeitgeist(zeitgeist: &Zeitgeist) -> Vec<u8> ⓘ
Encode zeitgeist to bytes (simplified CBOR-like format)
Sourcepub fn track_funnel(
&self,
zeitgeist: &Zeitgeist,
observations: &[f64],
) -> FunnelState
pub fn track_funnel( &self, zeitgeist: &Zeitgeist, observations: &[f64], ) -> FunnelState
Track deadband funnel for precision convergence
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Pending count
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FluxManager
impl RefUnwindSafe for FluxManager
impl Send for FluxManager
impl Sync for FluxManager
impl Unpin for FluxManager
impl UnsafeUnpin for FluxManager
impl UnwindSafe for FluxManager
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