pub struct PortConnection<'a> {
pub port: Port,
pub data: PortData<'a>,
}
Expand description
Represents a connection between a port and the data attached to the port by the plugin host.
Fields§
§port: Port
The port which the data is connected to.
data: PortData<'a>
The data connected to the port. It’s usually simpler to use the various unwrap_* functions than to interface with this directly.
Implementations§
Source§impl<'a> PortConnection<'a>
impl<'a> PortConnection<'a>
Sourcepub fn unwrap_audio(&'a self) -> &'a [Data] ⓘ
pub fn unwrap_audio(&'a self) -> &'a [Data] ⓘ
Returns a slice pointing to the internal data of an audio input port. Panics if this port
is not an AudioIn
port.
Sourcepub fn unwrap_audio_mut(&'a self) -> RefMut<'a, &'a mut [Data]>
pub fn unwrap_audio_mut(&'a self) -> RefMut<'a, &'a mut [Data]>
Returns a mutable slice pointing to the internal data of an audio output port. Panics if
this port is not an AudioOut
port.
Sourcepub fn unwrap_control(&'a self) -> &'a Data
pub fn unwrap_control(&'a self) -> &'a Data
Returns a refrence to the internal data of an control input port. Panics if this port
is not an ControlIn
port.
Sourcepub fn unwrap_control_mut(&'a self) -> RefMut<'a, &'a mut Data>
pub fn unwrap_control_mut(&'a self) -> RefMut<'a, &'a mut Data>
Returns a mutable refrence to the internal data of an audio output port. Panics if
this port is not an ControlOut
port.
Auto Trait Implementations§
impl<'a> !Freeze for PortConnection<'a>
impl<'a> !RefUnwindSafe for PortConnection<'a>
impl<'a> Send for PortConnection<'a>
impl<'a> Sync for PortConnection<'a>
impl<'a> Unpin for PortConnection<'a>
impl<'a> !UnwindSafe for PortConnection<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more