[−][src]Struct mixer_wrappers::constellation::ConstellationClient
Wrapper for connecting and interacting with Constellation.
Fields
join_handle: JoinHandle<()>
Internal thread join handle
Implementations
impl ConstellationClient
[src]
pub fn connect(client_id: &str) -> Result<(Self, Receiver<String>), Error>
[src]
Connect to Constellation.
Arguments
client_id
- your client ID
Examples
use mixer_wrappers::ConstellationClient; let (client, receiver) = ConstellationClient::connect("aaa").unwrap();
pub fn call_method(
&mut self,
method: &str,
params: &HashMap<String, Value>
) -> Result<(), Error>
[src]
&mut self,
method: &str,
params: &HashMap<String, Value>
) -> Result<(), Error>
Call a method, sending data to the socket.
Arguments
method
- method nameparams
- method parameters
Examples
let mut map = HashMap::new(); map.insert(String::from("abc"), json!(123)); if let Err(e) = client.call_method("some_method", &map) { // ... }
pub fn subscribe(&mut self, events: &[&str]) -> Result<(), Error>
[src]
Subscribe to events.
The documentation on this method is found here, as well as a listing of events.
Arguments
events
- slice of event names to subscribe to
Examples
client.subscribe(&["aaa", "bbb"]).unwrap();
pub fn unsubscribe(&mut self, events: &[&str]) -> Result<(), Error>
[src]
Unsubscribe from events.
The documentation on this method is found here, as well as a listing of events.
Arguments
events
- slice of event names to subscribe to
Examples
client.unsubscribe(&["aaa", "bbb"]).unwrap();
pub fn parse(message: &str) -> Result<StreamMessage, Error>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ConstellationClient
impl Send for ConstellationClient
impl !Sync for ConstellationClient
impl Unpin for ConstellationClient
impl !UnwindSafe for ConstellationClient
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,