pub struct PrivateBuilder<'a> { /* private fields */ }Expand description
The constructor for one connection’s private elements.
Implementations§
Source§impl PrivateBuilder<'_>
impl PrivateBuilder<'_>
Sourcepub fn user_in(
&mut self,
channel: ChannelRef,
who: Occupant,
name: &str,
) -> UserRef
pub fn user_in( &mut self, channel: ChannelRef, who: Occupant, name: &str, ) -> UserRef
Place a user in a channel, visible to this connection only.
The channel is one this connection can already see - which
ShardBuilder::finish verifies rather than assumes.
Sourcepub fn channel(
&mut self,
parent: ChannelRef,
key: ChannelKey,
name: &str,
) -> ChannelRef
pub fn channel( &mut self, parent: ChannelRef, key: ChannelKey, name: &str, ) -> ChannelRef
A channel visible to this connection only.
pub fn user_flags(&mut self, user: UserRef, flags: UserFlags)
Sourcepub fn action(&mut self, key: ActionKey, text: &str, on: On)
pub fn action(&mut self, key: ActionKey, text: &str, on: On)
Offer this connection a context action: a button that is not a channel to double-click.
Declared like everything else, and withdrawn by simply not declaring it again. The flavor never emits a message; the difference with what this connection was already offered is what travels.
Offering the same key twice in one render is the last call winning, which is the same rule a flavor already gets from rendering a user twice.
Auto Trait Implementations§
impl<'a> Freeze for PrivateBuilder<'a>
impl<'a> RefUnwindSafe for PrivateBuilder<'a>
impl<'a> Send for PrivateBuilder<'a>
impl<'a> Sync for PrivateBuilder<'a>
impl<'a> Unpin for PrivateBuilder<'a>
impl<'a> !UnwindSafe for PrivateBuilder<'a>
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