pub struct DeviceProxy { /* private fields */ }
Implementations§
Source§impl DeviceProxy
impl DeviceProxy
Sourcepub fn take_event_stream(&self) -> DeviceEventStream
pub fn take_event_stream(&self) -> DeviceEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_identifier(
&self,
) -> QueryResponseFut<Option<String>, DefaultFuchsiaResourceDialect>
pub fn get_identifier( &self, ) -> QueryResponseFut<Option<String>, DefaultFuchsiaResourceDialect>
Returns an identifier for the camera. If present, identical devices on different systems will have the same identifier. Clients may use this to determine if additional semantics known a priori for a given device apply to the current camera.
Sourcepub fn get_configurations(
&self,
) -> QueryResponseFut<Vec<Configuration>, DefaultFuchsiaResourceDialect>
pub fn get_configurations( &self, ) -> QueryResponseFut<Vec<Configuration>, DefaultFuchsiaResourceDialect>
Returns a list of configurations supported by the camera. All cameras will have at least one configuration. The values returned are immutable - they will not change for the lifetime of the client’s connection to the Camera.
Sourcepub fn get_configurations2(
&self,
) -> QueryResponseFut<Vec<Configuration2>, DefaultFuchsiaResourceDialect>
pub fn get_configurations2( &self, ) -> QueryResponseFut<Vec<Configuration2>, DefaultFuchsiaResourceDialect>
Returns a list of configurations supported by the camera. All cameras will have at least one configuration. The values returned are immutable - they will not change for the lifetime of the client’s connection to the Camera.
Sourcepub fn watch_current_configuration(
&self,
) -> QueryResponseFut<u32, DefaultFuchsiaResourceDialect>
pub fn watch_current_configuration( &self, ) -> QueryResponseFut<u32, DefaultFuchsiaResourceDialect>
Returns the index of the current configuration when it has changed from a previously returned configuration, or is called by a client for the first time.
Sourcepub fn set_current_configuration(&self, index: u32) -> Result<(), Error>
pub fn set_current_configuration(&self, index: u32) -> Result<(), Error>
Sets the configuration using the provided index. Calling this method disconnects any existing Stream clients associated with this camera. An epitaph of ZX_OK will be sent for any connected Stream clients on closing.
Sourcepub fn watch_mute_state(
&self,
) -> QueryResponseFut<(bool, bool), DefaultFuchsiaResourceDialect>
pub fn watch_mute_state( &self, ) -> QueryResponseFut<(bool, bool), DefaultFuchsiaResourceDialect>
Returns the camera’s current mute state when it has changed from a previously returned state, or is called by a client for the first time. A camera may be muted using SetSoftwareMuteState or by a physical switch. If either muted mode is active, stream clients associated with this physical camera will stop receiving new frames.
Sourcepub fn set_software_mute_state(
&self,
muted: bool,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn set_software_mute_state( &self, muted: bool, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Sets the current camera’s software mute state. When transitioning to the muted state, this method returns when the camera has successfully ceased sending new frames to stream clients. When transitioning to the unmuted state, this method returns immediately.
Sourcepub fn connect_to_stream(
&self,
index: u32,
request: ServerEnd<Stream_Marker>,
) -> Result<(), Error>
pub fn connect_to_stream( &self, index: u32, request: ServerEnd<Stream_Marker>, ) -> Result<(), Error>
Connects to the Stream at the provided index. If any clients already exist for this stream, the request is closed with the ZX_ERR_ALREADY_BOUND epitaph.
Sourcepub fn rebind(&self, request: ServerEnd<DeviceMarker>) -> Result<(), Error>
pub fn rebind(&self, request: ServerEnd<DeviceMarker>) -> Result<(), Error>
Request another connection to this Device. This allows a client to delegate different operations to different coordinated clients.
Trait Implementations§
Source§impl Clone for DeviceProxy
impl Clone for DeviceProxy
Source§fn clone(&self) -> DeviceProxy
fn clone(&self) -> DeviceProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DeviceProxy
impl Debug for DeviceProxy
Source§impl DeviceProxyInterface for DeviceProxy
impl DeviceProxyInterface for DeviceProxy
type GetIdentifierResponseFut = QueryResponseFut<Option<String>>
type GetConfigurationsResponseFut = QueryResponseFut<Vec<Configuration>>
type GetConfigurations2ResponseFut = QueryResponseFut<Vec<Configuration2>>
type WatchCurrentConfigurationResponseFut = QueryResponseFut<u32>
type WatchMuteStateResponseFut = QueryResponseFut<(bool, bool)>
type SetSoftwareMuteStateResponseFut = QueryResponseFut<()>
fn get_identifier(&self) -> Self::GetIdentifierResponseFut
fn get_configurations(&self) -> Self::GetConfigurationsResponseFut
fn get_configurations2(&self) -> Self::GetConfigurations2ResponseFut
fn watch_current_configuration( &self, ) -> Self::WatchCurrentConfigurationResponseFut
fn set_current_configuration(&self, index: u32) -> Result<(), Error>
fn watch_mute_state(&self) -> Self::WatchMuteStateResponseFut
fn set_software_mute_state( &self, muted: bool, ) -> Self::SetSoftwareMuteStateResponseFut
fn connect_to_stream( &self, index: u32, request: ServerEnd<Stream_Marker>, ) -> Result<(), Error>
fn rebind(&self, request: ServerEnd<DeviceMarker>) -> Result<(), Error>
Source§impl Proxy for DeviceProxy
impl Proxy for DeviceProxy
Source§type Protocol = DeviceMarker
type Protocol = DeviceMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for DeviceProxy
impl !RefUnwindSafe for DeviceProxy
impl Send for DeviceProxy
impl Sync for DeviceProxy
impl Unpin for DeviceProxy
impl !UnwindSafe for DeviceProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)