Struct dittolive_ditto::transport::Global
source · [−]pub struct Global {
pub sync_group: u32,
}
Expand description
Settings not associated with any specific type of transport.
Fields
sync_group: u32
The sync group for this device.
When peer-to-peer transports are enabled, all devices with the same App
ID will normally form an interconnected mesh network. In some
situations it may be desirable to have distinct groups of devices
within the same app, so that connections will only be formed within
each group. The sync_group
parameter changes that group
membership. A device can only ever be in one sync group, which
by default is group 0. Up to 2^32 distinct group numbers can be used in
an app.
This is an optimization, not a security control. If a connection is
created manually, such as by specifying a connect
transport, then
devices from different sync groups will still sync as normal. If
two groups of devices are intended to have access to different data
sets, this must be enforced using Ditto’s permissions system.
Trait Implementations
impl Eq for Global
impl StructuralEq for Global
impl StructuralPartialEq for Global
Auto Trait Implementations
impl RefUnwindSafe for Global
impl Send for Global
impl Sync for Global
impl Unpin for Global
impl UnwindSafe for Global
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ManuallyDropMut for T
impl<T> ManuallyDropMut for T
type Ret = ManuallyDrop<T>
pub fn manually_drop_mut(&'__ mut self) -> &'__ mut ManuallyDrop<T>
impl<T> To for T where
T: ?Sized,
impl<T> To for T where
T: ?Sized,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more