pub struct PortFlags { /* private fields */ }Expand description
Flags for specifying port options.
-
IS_INPUT- The port can receive data. -
IS_OUTPUT- Data can be read from the port. -
IS_PHYSICAL- Port corresponds to some kind of physical I/O connector. -
CAN_MONITOR- A call tojack_port_request_monitor()makes sense. TODO: implement. Precisely what this means it dependent on the client. A typical result of it being called withtrueas the second argument is that data that would be available from an output port (withIS_PHYSICALset) is sent to a physical output connector as well, so that it can be heard/seen/whatever. -
IS_TERMINAL- For an input port, the data received by the port will not be passed on or made available at any other port. For output, the data available at the port does not originate from any other port. Audio synthesizers, I/O hardware interface clients, HDR systems are examples of clients that would set this flag for their ports.
Implementations§
Source§impl PortFlags
impl PortFlags
Sourcepub fn from_bits(bits: u32) -> Option<PortFlags>
pub fn from_bits(bits: u32) -> Option<PortFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub fn from_bits_truncate(bits: u32) -> PortFlags
pub fn from_bits_truncate(bits: u32) -> PortFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub fn intersects(&self, other: PortFlags) -> bool
pub fn intersects(&self, other: PortFlags) -> bool
Returns true if there are flags common to both self and other.
Trait Implementations§
Source§impl BitAndAssign for PortFlags
impl BitAndAssign for PortFlags
Source§fn bitand_assign(&mut self, other: PortFlags)
fn bitand_assign(&mut self, other: PortFlags)
Disables all flags disabled in the set.
Source§impl BitOrAssign for PortFlags
impl BitOrAssign for PortFlags
Source§fn bitor_assign(&mut self, other: PortFlags)
fn bitor_assign(&mut self, other: PortFlags)
Adds the set of flags.
Source§impl BitXorAssign for PortFlags
impl BitXorAssign for PortFlags
Source§fn bitxor_assign(&mut self, other: PortFlags)
fn bitxor_assign(&mut self, other: PortFlags)
Toggles the set of flags.
Source§impl Extend<PortFlags> for PortFlags
impl Extend<PortFlags> for PortFlags
Source§fn extend<T: IntoIterator<Item = PortFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = PortFlags>>(&mut self, iterator: T)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl FromIterator<PortFlags> for PortFlags
impl FromIterator<PortFlags> for PortFlags
Source§impl Ord for PortFlags
impl Ord for PortFlags
Source§impl PartialOrd for PortFlags
impl PartialOrd for PortFlags
Source§impl SubAssign for PortFlags
impl SubAssign for PortFlags
Source§fn sub_assign(&mut self, other: PortFlags)
fn sub_assign(&mut self, other: PortFlags)
Disables all flags enabled in the set.