pub struct ClientRepo { /* private fields */ }Implementations§
Source§impl ClientRepo
impl ClientRepo
pub fn get(&self, code: &str) -> Option<HttpClient>
pub fn get_or_default(&self, code: &str) -> HttpClient
pub fn get_default(&self) -> HttpClient
pub fn register(&self, code: &str, client: HttpClient)
pub fn set_default(&mut self, client: HttpClient)
pub fn global() -> &'static Self
Sourcepub unsafe fn set_global_default(client: HttpClient)
pub unsafe fn set_global_default(client: HttpClient)
§Safety
This function is not thread safe, it should be called before any other thread is spawned.
Trait Implementations§
Source§impl Debug for ClientRepo
impl Debug for ClientRepo
Auto Trait Implementations§
impl !Freeze for ClientRepo
impl !RefUnwindSafe for ClientRepo
impl Send for ClientRepo
impl Sync for ClientRepo
impl Unpin for ClientRepo
impl !UnwindSafe for ClientRepo
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