Skip to main content

SdkOptions

Struct SdkOptions 

Source
pub struct SdkOptions {
Show 14 fields pub package: String, pub module: String, pub version: String, pub base_url: Option<String>, pub embed: Option<String>, pub embed_args: Vec<String>, pub embed_env: BTreeMap<String, String>, pub embed_env_vars: Vec<EnvVar>, pub targets: Vec<String>, pub description: Option<String>, pub repository: Option<String>, pub paginated: Vec<String>, pub cursor_param: String, pub limit_param: String,
}
Expand description

Everything an emitter needs that the operations don’t carry.

Fields§

§package: String

Distribution name, e.g. finance-query.

§module: String

Import name, e.g. finance_query.

§version: String§base_url: Option<String>

Default server; falls back to the first Info server. Optional when SdkOptions::embed supplies one at runtime instead.

§embed: Option<String>

Server binary the package bundles and spawns, making the SDK self-contained: a client built with no base URL starts this and talks to it. None leaves the SDK a pure client for a hosted API.

§embed_args: Vec<String>

Arguments passed to the embedded server on every launch.

§embed_env: BTreeMap<String, String>

Environment applied to every launch, over the ambient one and under the caller’s own. Config beats ambient deliberately: an inherited PORT from whatever runs the consumer’s app must not decide where a bundled server binds.

§embed_env_vars: Vec<EnvVar>

The knobs the embedded server documents, parsed from its dotenv template. Becomes a typed ServerEnv on the client and a table in the README, so a client configures the same server the same way a deployment does.

§targets: Vec<String>

Target triples the embedded server is built for. Empty means target::Target::DEFAULT.

§description: Option<String>§repository: Option<String>§paginated: Vec<String>

Operation ids whose response switches to a {items, pageInfo} envelope when limit/cursor are sent.

§cursor_param: String§limit_param: String

Trait Implementations§

Source§

impl Clone for SdkOptions

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SdkOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SdkOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.