#[non_exhaustive]pub enum Source {
Camera(Option<String>),
Display(Option<String>),
Window(String),
App(String),
}Expand description
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Camera(Option<String>)
A camera / webcam. None opens the default camera.
The identifiers from cameras are an AVFoundation uniqueID on macOS,
a /dev/videoN path on Linux, and a Media Foundation symbolic link on
Windows. Bare numeric indices remain accepted on Linux and Windows.
Display(Option<String>)
A whole display. None opens the main display.
The id is a bare display index. macOS and Windows honor it; on Linux the xdg-desktop-portal picker owns selection and the id is ignored.
Window(String)
A single window, by the id windows reports. macOS only.
App(String)
Every window belonging to one application, by the id apps reports
(a bundle identifier). Windows that open later are included. macOS only.
Trait Implementations§
impl Eq for Source
impl StructuralPartialEq for Source
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnsafeUnpin for Source
impl UnwindSafe for Source
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