pub struct GrokClient { /* private fields */ }Expand description
Grok Realtime API client
Implementations§
Source§impl GrokClient
impl GrokClient
pub fn new(ws_url: String, api_key: String) -> Self
Sourcepub async fn connect(
&self,
session_config: SessionConfig,
) -> Result<(GrokSender, Receiver<ServerEvent>)>
pub async fn connect( &self, session_config: SessionConfig, ) -> Result<(GrokSender, Receiver<ServerEvent>)>
Connect to Grok and return sender/receiver handles
Returns:
GrokSender: For sending audio and tool resultsmpsc::Receiver<ServerEvent>: For receiving events from Grok
Auto Trait Implementations§
impl Freeze for GrokClient
impl RefUnwindSafe for GrokClient
impl Send for GrokClient
impl Sync for GrokClient
impl Unpin for GrokClient
impl UnwindSafe for GrokClient
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