pub struct General<'a> { /* private fields */ }
Expand description
General functions of the API.
Implementations§
source§impl<'a> General<'a>
impl<'a> General<'a>
sourcepub async fn version(&self) -> Result<Version>
pub async fn version(&self) -> Result<Version>
Gets data about the current plugin and RPC version.
sourcepub async fn stats(&self) -> Result<Stats>
pub async fn stats(&self) -> Result<Stats>
Gets statistics about OBS, obs-websocket, and the current session.
sourcepub async fn broadcast_custom_event<T>(&self, event_data: &T) -> Result<()>where
T: Serialize,
pub async fn broadcast_custom_event<T>(&self, event_data: &T) -> Result<()>where
T: Serialize,
Broadcasts a custom event to all web-socket clients. Receivers are clients which are identified and subscribed.
sourcepub async fn call_vendor_request<T, R>(
&self,
request: CallVendorRequest<'_, T>,
) -> Result<VendorResponse<R>>where
T: Serialize,
R: DeserializeOwned,
pub async fn call_vendor_request<T, R>(
&self,
request: CallVendorRequest<'_, T>,
) -> Result<VendorResponse<R>>where
T: Serialize,
R: DeserializeOwned,
Call a request registered to a vendor.
A vendor is a unique name registered by a third-party plugin or script, which allows for custom requests and events to be added to obs-websocket. If a plugin or script implements vendor requests or events, documentation is expected to be provided with them.
Auto Trait Implementations§
impl<'a> Freeze for General<'a>
impl<'a> !RefUnwindSafe for General<'a>
impl<'a> Send for General<'a>
impl<'a> Sync for General<'a>
impl<'a> Unpin for General<'a>
impl<'a> !UnwindSafe for General<'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