Struct buttplug::server::ButtplugServer
source · pub struct ButtplugServer { /* private fields */ }
Expand description
The server side of the Buttplug protocol. Frontend for connection to device management and communication.
Implementations§
source§impl ButtplugServer
impl ButtplugServer
sourcepub fn event_stream(&self) -> impl Stream<Item = ButtplugServerMessage>
pub fn event_stream(&self) -> impl Stream<Item = ButtplugServerMessage>
Retreive an async stream of ButtplugServerMessages. This is how the server sends out non-query-related updates to the system, including information on devices being added/removed, client disconnection, etc…
sourcepub fn device_manager(&self) -> Arc<ServerDeviceManager>
pub fn device_manager(&self) -> Arc<ServerDeviceManager>
Returns a references to the internal device manager, for handling configuration.
sourcepub fn disconnect(&self) -> BoxFuture<'_, Result<(), Error>>
pub fn disconnect(&self) -> BoxFuture<'_, Result<(), Error>>
Disconnects the server from a client, if it is connected.
sourcepub fn parse_message(
&self,
msg: ButtplugClientMessage
) -> BoxFuture<'static, Result<ButtplugServerMessage, Error>>
pub fn parse_message( &self, msg: ButtplugClientMessage ) -> BoxFuture<'static, Result<ButtplugServerMessage, Error>>
Sends a ButtplugClientMessage to be parsed by the server (for handshake or ping), or passed into the server’s [DeviceManager] for communication with devices.
pub fn shutdown(&self) -> ButtplugServerResultFuture
Trait Implementations§
source§impl Debug for ButtplugServer
impl Debug for ButtplugServer
Auto Trait Implementations§
impl Freeze for ButtplugServer
impl !RefUnwindSafe for ButtplugServer
impl Send for ButtplugServer
impl Sync for ButtplugServer
impl Unpin for ButtplugServer
impl !UnwindSafe for ButtplugServer
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