pub struct ButtplugServerBuilder { /* private fields */ }Expand description
Configures and creates ButtplugServer instances.
Implementations§
Source§impl ButtplugServerBuilder
impl ButtplugServerBuilder
pub fn new(device_manager: ServerDeviceManager) -> Self
Sourcepub fn name(&mut self, name: &str) -> &mut Self
pub fn name(&mut self, name: &str) -> &mut Self
Set the name of the server, which is relayed to the client on connection (mostly for confirmation in UI dialogs)
Sourcepub fn max_ping_time(&mut self, ping_time: u32) -> &mut Self
pub fn max_ping_time(&mut self, ping_time: u32) -> &mut Self
Set the maximum ping time, in milliseconds, for the server. If the server does not receive a Ping message in this amount of time after the handshake has succeeded, the server will automatically disconnect. If this is not called, the ping timer will not be activated.
Note that this has nothing to do with communication medium specific pings, like those built into the Websocket protocol. This ping is specific to the Buttplug protocol.
Sourcepub fn finish(&self) -> Result<ButtplugServer, ButtplugServerError>
pub fn finish(&self) -> Result<ButtplugServer, ButtplugServerError>
Try to build a ButtplugServer using the parameters given.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ButtplugServerBuilder
impl !RefUnwindSafe for ButtplugServerBuilder
impl Send for ButtplugServerBuilder
impl Sync for ButtplugServerBuilder
impl Unpin for ButtplugServerBuilder
impl !UnwindSafe for ButtplugServerBuilder
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