pub enum ClientRelation {
Following {
target: ClientId,
},
Sharing {
with: ClientId,
},
}Expand description
Relation to another client for input routing.
Used as Option<ClientRelation> where None means independent.
§Invariants
Following { target }: Input is ignored, sees target’s stateSharing { with }: Input routes to target’s state, sees target’s state
Variants§
Following
Read-only spectator. Input is ignored, sees target’s state.
Sharing
Bidirectional co-editing. Input goes to target’s state.
Implementations§
Source§impl ClientRelation
impl ClientRelation
Sourcepub const fn is_following(&self) -> bool
pub const fn is_following(&self) -> bool
Check if this is a Following relation.
Sourcepub const fn is_sharing(&self) -> bool
pub const fn is_sharing(&self) -> bool
Check if this is a Sharing relation.
Trait Implementations§
Source§impl Clone for ClientRelation
impl Clone for ClientRelation
Source§fn clone(&self) -> ClientRelation
fn clone(&self) -> ClientRelation
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 moreSource§impl Debug for ClientRelation
impl Debug for ClientRelation
Source§impl PartialEq for ClientRelation
impl PartialEq for ClientRelation
impl Copy for ClientRelation
impl Eq for ClientRelation
impl StructuralPartialEq for ClientRelation
Auto Trait Implementations§
impl Freeze for ClientRelation
impl RefUnwindSafe for ClientRelation
impl Send for ClientRelation
impl Sync for ClientRelation
impl Unpin for ClientRelation
impl UnsafeUnpin for ClientRelation
impl UnwindSafe for ClientRelation
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request