MCPcopy Create free account
hub / github.com/buttplugio/buttplug / get_device

Function get_device

crates/intiface_engine/src/rest_server.rs:107–116  ·  view source on GitHub ↗
(
  client: &ButtplugClient,
  index: u32,
)

Source from the content-addressed store, hash-verified

105pub struct IntifaceRestServer {}
106
107fn get_device(
108 client: &ButtplugClient,
109 index: u32,
110) -> Result<ButtplugClientDevice, IntifaceRestError> {
111 client
112 .devices()
113 .get(&index)
114 .ok_or(IntifaceRestError::InvalidDevice(index))
115 .cloned()
116}
117
118fn get_feature(
119 client: &ButtplugClient,

Callers 5

get_featureFunction · 0.85
stop_deviceFunction · 0.85
set_device_outputFunction · 0.85
get_featuresFunction · 0.85
get_feature_infoFunction · 0.85

Calls 1

devicesMethod · 0.45

Tested by

no test coverage detected