pub fn new_with_port<S>(prefix: S, serialosc_port: u16) -> Result<Monome, String>
    where
        S: Into<String>,
    {
        let devices = Monome::enumerate_devices_with_port(serialosc_port)?;
        if devices.is_empty() {
            return Err("No devices detected".to_string());
        }
        Monome::from_device(&devices[0], prefix.into())
    }
/// Sets up the "first" monome device, with a particular prefix and a non-standard port for
/// serialosc. When multiple devices are plugged in, it's unclear which one is activated,
/// however this is rare.
///
/// # Arguments
///
/// * `prefix` - the prefix to use for this device and this application
/// * `serialosc_port` - the port at which serialosc can be reached.
///
/// # Example
///
/// Set up a monome, with a prefix of "/prefix", and specify an explicit port on which
/// serialosc can be reached (here, the default of 12002):
///
/// ```no_run
/// # use monome::Monome;
/// let m = Monome::new_with_port("/prefix", 12002);
///
/// match m {
///   Ok(monome) => {
///     println!("{:?}", monome);
///   }
///   Err(s) => {
///     println!("Could not setup the monome: {}", s);
///   }
/// }
/// ```
Sets up the "first" monome device, with a particular prefix and a non-standard port for
serialosc. When multiple devices are plugged in, it's unclear which one is activated,
however this is rare.
Sets up the " first " monome device with a particular prefix and a non - standard port for serialosc . When multiple devices are plugged in it ' s unclear which one is activated however this is rare .
pub fn new_with_port<S>(prefix: S, serialosc_port: u16) -> Result<Monome, String>
    where
        S: Into<String>,
    {
        let devices = Monome::enumerate_devices_with_port(serialosc_port)?;
        if devices.is_empty() {
            return Err("No devices detected".to_string());
        }
        Monome::from_device(&devices[0], prefix.into())
    }
pub fn new_with_port < S > ( prefix : S , serialosc_port : u16 ) -> Result < Monome , String > where S : Into < String > , { let devices = Monome :: enumerate_devices_with_port ( serialosc_port ) ? ; if devices . is_empty ( ) { return Err ( " " . to_string ( ) ) ; } Monome :: from_device ( & devices [ 0 ] , prefix . into ( ) ) }
Sets up the "first" monome device, with a particular prefix and a non-standard port for
serialosc.
Sets up the " first " monome device with a particular prefix and a non - standard port for serialosc .
prefix
S
serialosc_port
u16
prefix
S
serialosc_port
u16
example
Set up a monome, with a prefix of "/prefix", and specify an explicit port on which
serialosc can be reached (here, the default of 12002).


Set up a monome with a prefix of " / prefix " and specify an explicit port on which serialosc can be reached ( here the default of 12002 ) .
use monome::monome;
None