Skip to main content

PortType

Enum PortType 

Source
pub enum PortType {
Show 13 variants Signal, SignalFloat, IntSignal, Float, Int, Bang, List, Symbol, Any, MultiChannelSignal, MultiChannelSignalFloat, Dynamic, Inactive,
}
Expand description

Port (inlet/outlet) type for Max objects

Variants§

§

Signal

Signal only (audio rate only)

§

SignalFloat

Signal + Float dual (controlled by float when no signal connection)

§

IntSignal

Int + Signal dual

§

Float

Float only

§

Int

Int only

§

Bang

Bang only

§

List

List only

§

Symbol

Symbol only

§

Any

Any message (bang, int, float, list, symbol)

§

MultiChannelSignal

Multi-channel signal

§

MultiChannelSignalFloat

Multi-channel signal + float

§

Dynamic

Depends on argument type (placeholder for variable objects)

§

Inactive

Inactive inlet/outlet

Implementations§

Source§

impl PortType

Source

pub fn from_xml_type(type_str: &str) -> Self

Convert XML type attribute string to PortType. Normalizes case differences and notation variants (/, “ or “, “, “).

Source

pub fn accepts_signal(&self) -> bool

Whether this port accepts Signal

Source

pub fn accepts_control(&self) -> bool

Whether this port accepts Control messages

Trait Implementations§

Source§

impl Clone for PortType

Source§

fn clone(&self) -> PortType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PortType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for PortType

Source§

fn eq(&self, other: &PortType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for PortType

Source§

impl StructuralPartialEq for PortType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.