pub struct Port { /* private fields */ }Expand description
Proxy that represents a port that is connected to the server.
Implementations§
Source§impl Port
impl Port
Sourcepub fn add_listener(&self, events: PortEvents) -> HookId
pub fn add_listener(&self, events: PortEvents) -> HookId
Register for notifications of port events.
Sourcepub fn remove_listener(&self, hook_id: HookId)
pub fn remove_listener(&self, hook_id: HookId)
Remove a set of event listeners.
Sourcepub fn subscribe_params(&self, ids: &[ParamType]) -> Result<()>
pub fn subscribe_params(&self, ids: &[ParamType]) -> Result<()>
Register for notifications of the specified param types.
Sourcepub fn enum_params(
&self,
seq: u32,
id: Option<ParamType>,
start: u32,
num: u32,
filter: Option<ParamBuilder>,
) -> Result<()>
pub fn enum_params( &self, seq: u32, id: Option<ParamType>, start: u32, num: u32, filter: Option<ParamBuilder>, ) -> Result<()>
Enumerate params (via PortEvents::param). Set id to None to query all param types.
Trait Implementations§
Source§impl Refcounted for Port
impl Refcounted for Port
Source§fn upgrade(this: &Self::WeakRef) -> Option<Self>
fn upgrade(this: &Self::WeakRef) -> Option<Self>
Try to convert a weak reference to a strong reference. If the underlying object isstill
alive, returns a
Some continaing the value. If the underlying object’s strong reference
count dropped to zero, and was thus freed, this returns None.Source§fn downgrade(&self) -> Self::WeakRef
fn downgrade(&self) -> Self::WeakRef
Create a weak reference to the object. This reference does not impact the object’s
lifecycle, and merely allows us the option to try to retrieve the object using
Self::upgrade().
impl Send for Port
impl Sync for Port
Auto Trait Implementations§
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