pub struct WindAdvancedSync {
runtime: Arc<ApplicationRunTime>,
document_sync: Arc<Mutex<DocumentSynchronization>>,
ui_state_sync: Arc<Mutex<UIStateSynchronization>>,
real_time_updates: Arc<Mutex<RealTimeUpdates>>,
performance_stats: Arc<Mutex<PerformanceStats>>,
}Expand description
Advanced Wind synchronization features
Fields§
§runtime: Arc<ApplicationRunTime>§document_sync: Arc<Mutex<DocumentSynchronization>>§ui_state_sync: Arc<Mutex<UIStateSynchronization>>§real_time_updates: Arc<Mutex<RealTimeUpdates>>§performance_stats: Arc<Mutex<PerformanceStats>>Implementations§
Source§impl WindAdvancedSync
impl WindAdvancedSync
Sourcepub fn new(runtime: Arc<ApplicationRunTime>) -> Self
pub fn new(runtime: Arc<ApplicationRunTime>) -> Self
Create a new WindAdvancedSync instance
Sourcepub async fn initialize(&self) -> Result<(), String>
pub async fn initialize(&self) -> Result<(), String>
Initialize the synchronization service
Sourceasync fn start_sync_task(&self)
async fn start_sync_task(&self)
Start background synchronization task
Sourceasync fn start_performance_monitoring(&self)
async fn start_performance_monitoring(&self)
Start performance monitoring
Sourcefn calculate_sync_status(
documents: &HashMap<String, SynchronizedDocument>,
) -> SyncStatus
fn calculate_sync_status( documents: &HashMap<String, SynchronizedDocument>, ) -> SyncStatus
Calculate synchronization status
Source§impl WindAdvancedSync
impl WindAdvancedSync
Sourcepub async fn start_synchronization(self: Arc<Self>) -> Result<(), String>
pub async fn start_synchronization(self: Arc<Self>) -> Result<(), String>
Start advanced synchronization
Sourceasync fn synchronize_documents(&self)
async fn synchronize_documents(&self)
Synchronize documents between Wind and Mountain
Sourceasync fn synchronize_ui_state(&self)
async fn synchronize_ui_state(&self)
Synchronize UI state
Sourceasync fn broadcast_real_time_updates(&self)
async fn broadcast_real_time_updates(&self)
Broadcast real-time updates
Sourceasync fn get_pending_changes(&self) -> Vec<DocumentChange>
async fn get_pending_changes(&self) -> Vec<DocumentChange>
Get pending document changes
Sourceasync fn apply_document_change(
&self,
change: DocumentChange,
) -> Result<(), String>
async fn apply_document_change( &self, change: DocumentChange, ) -> Result<(), String>
Apply document change
Sourceasync fn check_for_conflicts(
&self,
change: &DocumentChange,
) -> Result<(), String>
async fn check_for_conflicts( &self, change: &DocumentChange, ) -> Result<(), String>
CONFLICT DETECTION: Microsoft-inspired conflict resolution
Sourceasync fn update_sync_status(&self)
async fn update_sync_status(&self)
Update sync status
Sourceasync fn get_ui_state(&self) -> UIStateSynchronization
async fn get_ui_state(&self) -> UIStateSynchronization
Get UI state
Sourceasync fn update_ui_state(
&self,
ui_state: UIStateSynchronization,
) -> Result<(), String>
async fn update_ui_state( &self, ui_state: UIStateSynchronization, ) -> Result<(), String>
Update UI state
Sourceasync fn get_pending_updates(&self) -> Vec<RealTimeUpdate>
async fn get_pending_updates(&self) -> Vec<RealTimeUpdate>
Get pending updates
Sourceasync fn broadcast_updates(
&self,
updates: Vec<RealTimeUpdate>,
) -> Result<(), String>
async fn broadcast_updates( &self, updates: Vec<RealTimeUpdate>, ) -> Result<(), String>
Broadcast updates to subscribers
Sourcepub async fn add_document(
&self,
document_id: String,
file_path: String,
) -> Result<(), String>
pub async fn add_document( &self, document_id: String, file_path: String, ) -> Result<(), String>
Add document for synchronization
Sourcepub async fn subscribe_to_updates(
&self,
target: String,
subscriber: String,
) -> Result<(), String>
pub async fn subscribe_to_updates( &self, target: String, subscriber: String, ) -> Result<(), String>
Subscribe to real-time updates
Sourcepub async fn queue_update(&self, update: RealTimeUpdate) -> Result<(), String>
pub async fn queue_update(&self, update: RealTimeUpdate) -> Result<(), String>
Queue real-time update
Sourcepub async fn get_sync_status(&self) -> SyncStatus
pub async fn get_sync_status(&self) -> SyncStatus
Get sync status
Sourcepub async fn get_current_ui_state(&self) -> UIStateSynchronization
pub async fn get_current_ui_state(&self) -> UIStateSynchronization
Get UI state
Sourcefn clone_sync(&self) -> WindAdvancedSync
fn clone_sync(&self) -> WindAdvancedSync
Clone sync for async tasks
Trait Implementations§
Source§impl Clone for WindAdvancedSync
impl Clone for WindAdvancedSync
Source§fn clone(&self) -> WindAdvancedSync
fn clone(&self) -> WindAdvancedSync
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WindAdvancedSync
impl !RefUnwindSafe for WindAdvancedSync
impl Send for WindAdvancedSync
impl Sync for WindAdvancedSync
impl Unpin for WindAdvancedSync
impl !UnwindSafe for WindAdvancedSync
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].