pub struct LCUWebSocket { /* private fields */ }
Expand description
Struct representing a connection to the LCU websocket
Implementations§
Source§impl LCUWebSocket
impl LCUWebSocket
Sourcepub async fn new(
f: impl Fn(Result<&[Value], Error>) -> ControlFlow<(), Flow> + Send + Sync + 'static,
) -> Result<Self, Error>
pub async fn new( f: impl Fn(Result<&[Value], Error>) -> ControlFlow<(), Flow> + Send + Sync + 'static, ) -> Result<Self, Error>
Sourcepub fn auth_header(&self) -> &str
pub fn auth_header(&self) -> &str
Returns a reference to the auth header in use
Sourcepub fn unsubscribe(&mut self, endpoint: EventType)
pub fn unsubscribe(&mut self, endpoint: EventType)
Unsubscribe to a new API event
pub fn is_finished(&self) -> bool
Sourcepub fn request(&mut self, code: RequestType, endpoint: EventType)
pub fn request(&mut self, code: RequestType, endpoint: EventType)
Allows you to make a generic request to the websocket socket
Auto Trait Implementations§
impl Freeze for LCUWebSocket
impl !RefUnwindSafe for LCUWebSocket
impl Send for LCUWebSocket
impl Sync for LCUWebSocket
impl Unpin for LCUWebSocket
impl !UnwindSafe for LCUWebSocket
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