pub struct Credentials {
pub port: u16,
pub password: String,
pub pid: u32,
}Expand description
LCU API credentials extracted from the running League Client.
Debug is implemented manually to redact the password — it is never
printed to logs even if an instance is traced.
Fields§
§port: u16Local port the LCU HTTPS + WSS server is listening on.
password: StringPassword for HTTP Basic Auth. The username is always riot.
pid: u32Process ID of the League Client.
Implementations§
Source§impl Credentials
impl Credentials
Sourcepub fn basic_auth(&self) -> String
pub fn basic_auth(&self) -> String
Build the Authorization: Basic … header value.
Sourcepub fn lcu_base_url(&self) -> String
pub fn lcu_base_url(&self) -> String
HTTPS base URL, e.g. https://127.0.0.1:52437.
Sourcepub fn lcu_ws_url(&self) -> String
pub fn lcu_ws_url(&self) -> String
WSS URL for the LCU WebSocket, e.g. wss://127.0.0.1:52437.
Trait Implementations§
Source§impl Clone for Credentials
impl Clone for Credentials
Source§fn clone(&self) -> Credentials
fn clone(&self) -> Credentials
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Credentials
impl Debug for Credentials
Source§impl<'de> Deserialize<'de> for Credentials
impl<'de> Deserialize<'de> for Credentials
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Credentials
impl RefUnwindSafe for Credentials
impl Send for Credentials
impl Sync for Credentials
impl Unpin for Credentials
impl UnsafeUnpin for Credentials
impl UnwindSafe for Credentials
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