pub struct InstanceSynchronousProxy { /* private fields */ }
Implementations§
Source§impl InstanceSynchronousProxy
impl InstanceSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<InstanceEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<InstanceEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn add_line(
&self,
line: &[Point; 2],
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn add_line( &self, line: &[Point; 2], ___deadline: MonotonicInstant, ) -> Result<(), Error>
Add a line to the canvas.
This method can be considered an improvement over the one-way case from a flow control perspective, as it is now much more difficult for a well-behaved client to “get ahead” of the server and overwhelm. This is because the client now waits for each request to be acked by the server before proceeding. This change represents a trade-off: we get much greater synchronization of message flow between the client and the server, at the cost of worse performance at the limit due to the extra wait imposed by each ack.
Trait Implementations§
Source§impl Debug for InstanceSynchronousProxy
impl Debug for InstanceSynchronousProxy
Source§impl SynchronousProxy for InstanceSynchronousProxy
impl SynchronousProxy for InstanceSynchronousProxy
Source§type Proxy = InstanceProxy
type Proxy = InstanceProxy
The async proxy for the same protocol.
Source§type Protocol = InstanceMarker
type Protocol = InstanceMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for InstanceSynchronousProxy
impl RefUnwindSafe for InstanceSynchronousProxy
impl Send for InstanceSynchronousProxy
impl Sync for InstanceSynchronousProxy
impl Unpin for InstanceSynchronousProxy
impl UnwindSafe for InstanceSynchronousProxy
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