pub struct WmeClient { /* private fields */ }Expand description
Main Wikimedia Enterprise API client.
Implementations§
Source§impl WmeClient
impl WmeClient
Sourcepub async fn new(config: ClientConfig) -> Result<Self>
pub async fn new(config: ClientConfig) -> Result<Self>
Create a new client with the given configuration.
Sourcepub fn builder() -> WmeClientBuilder
pub fn builder() -> WmeClientBuilder
Create a client builder.
Sourcepub fn metadata(&self) -> MetadataClient<'_>
pub fn metadata(&self) -> MetadataClient<'_>
Get the metadata client.
Sourcepub fn snapshot(&self) -> SnapshotClient<'_>
pub fn snapshot(&self) -> SnapshotClient<'_>
Get the snapshot client.
Sourcepub fn on_demand(&self) -> OnDemandClient<'_>
pub fn on_demand(&self) -> OnDemandClient<'_>
Get the on-demand client.
Sourcepub fn realtime(&self) -> RealtimeClient<'_>
pub fn realtime(&self) -> RealtimeClient<'_>
Get the realtime client.
Sourcepub fn token_manager(&self) -> Option<&TokenManager>
pub fn token_manager(&self) -> Option<&TokenManager>
Get the token manager if available.
Returns Some(&TokenManager) if the client was built with credentials,
or None if the client was built without authentication.
This allows CLI applications to retrieve tokens after login for storage, or to set tokens from a previous session.
Auto Trait Implementations§
impl Freeze for WmeClient
impl !RefUnwindSafe for WmeClient
impl Send for WmeClient
impl Sync for WmeClient
impl Unpin for WmeClient
impl UnsafeUnpin for WmeClient
impl !UnwindSafe for WmeClient
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