pub enum InstanceRequest {
AddLine {
line: [Point; 2],
responder: InstanceAddLineResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: InstanceControlHandle,
method_type: MethodType,
},
}
Expand description
Manages a single instance of a canvas. Each session of this protocol is responsible for a new canvas.
Variants§
AddLine
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.
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
control_handle: InstanceControlHandle
§
method_type: MethodType
Implementations§
Source§impl InstanceRequest
impl InstanceRequest
pub fn into_add_line(self) -> Option<([Point; 2], InstanceAddLineResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InstanceRequest
impl !RefUnwindSafe for InstanceRequest
impl Send for InstanceRequest
impl Sync for InstanceRequest
impl Unpin for InstanceRequest
impl !UnwindSafe for InstanceRequest
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