pub struct SyncGroup { /* private fields */ }Expand description
A group of synced charts. Cloning gives another handle to the same group.
§Examples
use ferrochart_core::sync::{SyncGroup, SyncOptions};
use ferrochart_core::{Chart, ChartOptions};
let group = SyncGroup::new();
let mut a = Chart::new(ChartOptions::default());
let mut b = Chart::new(ChartOptions::default());
a.join_sync(&group, SyncOptions::default());
b.join_sync(&group, SyncOptions { visible_range: false, ..SyncOptions::default() });
// Moving the crosshair over `a` now shows it on `b` after `b` builds a frame.Implementations§
Source§impl SyncGroup
impl SyncGroup
Sourcepub fn with_origin(origin: u32) -> Self
pub fn with_origin(origin: u32) -> Self
Creates an empty group whose drawing SyncKeys start with
origin (the high 32 bits). Hosts that forward drawing operations
between groups (charts in different workers) give each group its own
origin, so that keys do not collide.
§Examples
use ferrochart_core::sync::SyncGroup;
let worker_a = SyncGroup::with_origin(1);
let worker_b = SyncGroup::with_origin(2);Trait Implementations§
Auto Trait Implementations§
impl Forget for SyncGroup
impl Freeze for SyncGroup
impl Move for SyncGroup
impl RefUnwindSafe for SyncGroup
impl Send for SyncGroup
impl Sync for SyncGroup
impl Unpin for SyncGroup
impl UnsafeUnpin for SyncGroup
impl UnwindSafe for SyncGroup
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