const INVALID_PORT_MSG: &str = "invalid port"; const PORT_OUT_OF_RANGE_MSG: &str = "provided port number was out of range"; const CANNOT_RETRIEVE_PORT_NAME_MSG: &str = "unknown error when trying to retrieve the port name";
#[derive(Debug, Clone, Copy, PartialEq, Eq)] /// An error that can occur during initialization (i.e., while /// creating a `MidiInput` or `MidiOutput` object). pubstruct InitError;
impl Error for InitError {}
impl fmt::Display for InitError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { "MIDI support could not be initialized".fmt(f)
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)] /// An error that can occur when retrieving information about /// available ports. pubenum PortInfoError {
PortNumberOutOfRange, // TODO: don't expose this
InvalidPort,
CannotRetrievePortName,
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.