pub trait ClientCore {
type Version: Version + Clone;
// Required methods
fn client(&self) -> Result<Client, Error>;
fn configure(hostname: &str) -> XnatBuilder<Self::Version>;
fn new(
base_url: &Url,
timeouts: &Option<Timeouts>,
use_secure: bool,
version: &Self::Version,
) -> Self;
fn version(&self) -> &Self::Version;
}Expand description
Core behavior for a Xnat client. Defines
common use methods needed across all other
client traits.
Required Associated Types§
Required Methods§
Sourcefn configure(hostname: &str) -> XnatBuilder<Self::Version>
fn configure(hostname: &str) -> XnatBuilder<Self::Version>
Initialize an XnatBuilder allowing
configuration of an XNAT client.
use oxinat_core::*;
#[derive(Clone, Version, FullUri)]
#[version(root_uri = "xapi", data_uri = "data")]
struct MyVersion;
let builder = Xnat::configure("xnat.host.org")
.with_version(MyVersion)
.with_password("my-password")
.with_username("my-username");Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".