pub struct ExternalClient { /* private fields */ }Expand description
External data source client
§TLS crypto provider
When built with the download feature, ExternalClient::new / ExternalClient::with_config
construct a reqwest::Client eagerly, which builds its rustls ClientConfig inside
.build() even for a client that never issues an HTTPS request. Since the workspace’s
reqwest dependency uses rustls-no-provider (no aws-lc-rs/ring bundled – see the
“PURE RUST BLOCKER (reqwest)” note in the workspace root Cargo.toml), this crate installs
the pure-Rust OxiTLS provider (oxitls-rustcrypto-provider, COOLJAPAN’s RUSTSEC-2026-0104-fixed
fork of the abandoned upstream rustls-rustcrypto 0.0.2-alpha, resolved under the
rustls-rustcrypto name) as the process-default rustls CryptoProvider automatically,
right before the first client is constructed – unless the application has already installed
a provider of its own. Applications that want a different provider (e.g. a C-linked
aws-lc-rs/ring one) simply call rustls::crypto::CryptoProvider::install_default(...)
before the first use of SciRS2 networking; an existing process default is never overridden.
Implementations§
Source§impl ExternalClient
impl ExternalClient
Sourcepub fn with_config(config: ExternalConfig) -> Result<Self>
pub fn with_config(config: ExternalConfig) -> Result<Self>
Create a new external client with custom configuration
Sourcepub async fn download_dataset(
&self,
url: &str,
progress: Option<ProgressCallback>,
) -> Result<Dataset>
pub async fn download_dataset( &self, url: &str, progress: Option<ProgressCallback>, ) -> Result<Dataset>
Download a dataset from a URL
Sourcepub fn download_dataset_sync(
&self,
url: &str,
progress: Option<ProgressCallback>,
) -> Result<Dataset>
pub fn download_dataset_sync( &self, url: &str, progress: Option<ProgressCallback>, ) -> Result<Dataset>
Download a dataset synchronously (blocking) - when download feature is enabled
Auto Trait Implementations§
impl !Freeze for ExternalClient
impl !RefUnwindSafe for ExternalClient
impl !Sync for ExternalClient
impl !UnwindSafe for ExternalClient
impl Send for ExternalClient
impl Unpin for ExternalClient
impl UnsafeUnpin for ExternalClient
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.