pub struct DiscoveryService { /* private fields */ }Expand description
Shareable lazy discovery service backed by a single unified BackendRawInventory.
One-shot snapshots never spawn background threads.
Implementations§
Source§impl DiscoveryService
impl DiscoveryService
pub fn new_for_os(os: PlatformOs) -> DiscoveryService
pub fn os(&self) -> PlatformOs
pub fn active_subscriber_count(&self) -> usize
pub fn current_revision(&self) -> u64
pub fn default_output_device_id(&self) -> Option<Arc<str>>
pub fn default_input_device_id(&self) -> Option<Arc<str>>
pub fn update_backend_inventory( &self, inventory: BackendRawInventory, query: &DiscoveryQuery, ) -> Result<u64, PlanError>
pub fn applications( &self, active_only: bool, include_non_audio: bool, ) -> Result<Vec<CaptureTarget>, PlanError>
pub fn processes( &self, active_only: bool, include_non_audio: bool, ) -> Result<Vec<CaptureTarget>, PlanError>
pub fn output_devices(&self) -> Result<Vec<CaptureTarget>, PlanError>
pub fn input_devices(&self) -> Result<Vec<CaptureTarget>, PlanError>
pub fn ingest_backend_inventory( &self, inventory: BackendRawInventory, query: &DiscoveryQuery, ) -> Result<u64, PlanError>
pub fn discover_query( &self, query: &DiscoveryQuery, ) -> Result<TargetCatalog, PlanError>
pub fn discover( &self, filter: DiscoveryFilter, ) -> Result<TargetSnapshot, PlanError>
pub fn find_app( &self, query: &str, scope: ProcessScope, on_root_exit: OnRootExit, ) -> Result<CaptureTarget, FindAppError>
pub fn find_app_with_backends( &self, query: &str, backends: &Backends, scope: ProcessScope, on_root_exit: OnRootExit, ) -> Result<CaptureTarget, FindAppError>
pub fn subscribe( &self, filter: DiscoveryFilter, max_discovery_queue: usize, ) -> Result<DiscoverySubscription, PlanError>
Sourcepub fn subscribe_query(
&self,
query: DiscoveryQuery,
max_discovery_queue: usize,
) -> Result<DiscoverySubscription, PlanError>
pub fn subscribe_query( &self, query: DiscoveryQuery, max_discovery_queue: usize, ) -> Result<DiscoverySubscription, PlanError>
Subscribe to incremental discovery events governed by a DiscoveryQuery
(supporting DiscoveryDedupe::PerBackend, custom Backends filtering, and resnapshot_catalog).
pub fn publish_event(&self, kind: DiscoveryEventKind) -> u64
Trait Implementations§
Source§impl Clone for DiscoveryService
impl Clone for DiscoveryService
Source§fn clone(&self) -> DiscoveryService
fn clone(&self) -> DiscoveryService
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 DiscoveryService
impl RefUnwindSafe for DiscoveryService
impl Send for DiscoveryService
impl Sync for DiscoveryService
impl Unpin for DiscoveryService
impl UnsafeUnpin for DiscoveryService
impl UnwindSafe for DiscoveryService
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