pub struct Attachment { /* private fields */ }
Expand description
A handle for sending messages to the server over an attachment stream.
An attachment is ended once the corresponding AttachmentDelegate receives the attachment_ended or parameters_changed (with reattach_required = true) callbacks. Using it past that point will silently drop events.
Implementations§
Source§impl Attachment
impl Attachment
Sourcepub fn request_video_refresh(&self, stream_seq: u64)
pub fn request_video_refresh(&self, stream_seq: u64)
Requests that the server generate a packet with headers and a keyframe.
Sourcepub fn keyboard_input(&self, key: Key, state: KeyState, character: u32)
pub fn keyboard_input(&self, key: Key, state: KeyState, character: u32)
Sends keyboard input to the server.
Sourcepub fn pointer_entered(&self)
pub fn pointer_entered(&self)
Notifies the server that the pointer has entered the video area, including if it enters a letterbox around the video.
Sourcepub fn pointer_left(&self)
pub fn pointer_left(&self)
Notifies the server that the pointer has left the video area. This should consider any letterboxing part of the video area.
Sourcepub fn pointer_motion(&self, x: f64, y: f64)
pub fn pointer_motion(&self, x: f64, y: f64)
Sends pointer motion to the server.
Sourcepub fn relative_pointer_motion(&self, x: f64, y: f64)
pub fn relative_pointer_motion(&self, x: f64, y: f64)
Sends relative pointer motion to the server.
Sourcepub fn pointer_input(&self, button: Button, state: ButtonState, x: f64, y: f64)
pub fn pointer_input(&self, button: Button, state: ButtonState, x: f64, y: f64)
Sends pointer input to the server.
Sourcepub fn pointer_scroll(&self, scroll_type: ScrollType, x: f64, y: f64)
pub fn pointer_scroll(&self, scroll_type: ScrollType, x: f64, y: f64)
Sends pointer scroll events to the server.
Sourcepub fn gamepad_available(&self, pad: Gamepad)
pub fn gamepad_available(&self, pad: Gamepad)
Sends a ‘Gamepad Available’ event to the server.
Sends a ‘Gamepad Unavailable’ event to the server.
Sourcepub fn gamepad_motion(&self, id: u64, axis: GamepadAxis, value: f64)
pub fn gamepad_motion(&self, id: u64, axis: GamepadAxis, value: f64)
Sends gamepad joystick motion to the server.
Sourcepub fn gamepad_input(
&self,
id: u64,
button: GamepadButton,
state: GamepadButtonState,
)
pub fn gamepad_input( &self, id: u64, button: GamepadButton, state: GamepadButtonState, )
Sends gamepad button input to the server.
Sourcepub async fn detach(&self) -> Result<(), ClientError>
pub async fn detach(&self) -> Result<(), ClientError>
Ends the attachment.
Trait Implementations§
Source§impl<UT> LiftRef<UT> for Attachment
impl<UT> LiftRef<UT> for Attachment
type LiftType = Arc<Attachment>
Source§impl<UT> LowerError<UT> for Attachment
impl<UT> LowerError<UT> for Attachment
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for Attachment
impl<UT> LowerReturn<UT> for Attachment
Source§type ReturnType = <Arc<Attachment> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<Attachment> as LowerReturn<UniFfiTag>>::ReturnType
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl<UT> TypeId<UT> for Attachment
impl<UT> TypeId<UT> for Attachment
const TYPE_ID_META: MetadataBuffer
Auto Trait Implementations§
impl Freeze for Attachment
impl !RefUnwindSafe for Attachment
impl Send for Attachment
impl Sync for Attachment
impl Unpin for Attachment
impl !UnwindSafe for Attachment
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
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more