pub struct PatchSender { /* private fields */ }Expand description
Cheap-to-clone handle for sending patches from the rest of the dev server (file watcher / builder / etc.) to every connected client.
Implementations§
Source§impl PatchSender
impl PatchSender
Sourcepub fn send(&self, patch: Patch) -> usize
pub fn send(&self, patch: Patch) -> usize
Broadcast patch to every currently-connected client.
Returns the number of clients the message was queued for —
0 is fine (no client connected yet) and not an error.
Sourcepub fn client_count(&self) -> usize
pub fn client_count(&self) -> usize
Number of clients currently subscribed.
Sourcepub fn latest_aslr_reference(&self) -> Option<u64>
pub fn latest_aslr_reference(&self) -> Option<u64>
The runtime address of main (= subsecond::aslr_reference())
most recently reported by a connected client. None when no
client has connected or sent its hello yet — the patcher
should withhold Tier 1 patches in that case (fall back to
Tier 2 cold rebuild).
Trait Implementations§
Source§impl Clone for PatchSender
impl Clone for PatchSender
Source§fn clone(&self) -> PatchSender
fn clone(&self) -> PatchSender
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PatchSender
impl RefUnwindSafe for PatchSender
impl Send for PatchSender
impl Sync for PatchSender
impl Unpin for PatchSender
impl UnsafeUnpin for PatchSender
impl UnwindSafe for PatchSender
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