pub struct FixtureDocsClient {
pub base_url: Option<String>,
pub args: BTreeMap<String, Vec<String>>,
pub config: Option<Value>,
}Expand description
How a documentation snippet constructs its client, for fixtures whose subject is the client configuration.
A snippet is rendered with the mock harness stripped, so the generator’s client
construction degenerates to factory(<credential>, <no base URL>, <defaults…>).
A configuration/* fixture documenting a client setting can therefore not show
the setting it is named for unless it says so here.
This is docs-only. Generators reach it through super::Fixture::docs_client and
must pass it in from a documentation-only call site, so it cannot retarget the
executable e2e suite, whose client has to keep pointing at the mock server.
Fields§
§base_url: Option<String>Base URL the snippet’s client is constructed with.
Carried as plain data rather than a rendered expression: every binding wraps
an optional string differently (Some("…".to_string()) in Rust, a bare literal
in Java), and that wrapping is the generator’s knowledge, not the fixture’s.
args: BTreeMap<String, Vec<String>>Verbatim argument expressions following the base URL, keyed by binding language
(rust, java, …).
Overrides [e2e.call.overrides.<lang>] client_factory_trailing_args for this
fixture alone; a language absent from the map keeps the configured list. Values
are emitted as written, so they must be valid source in the target language —
use this for settings with no language-agnostic representation (timeouts,
retry policies, builder expressions).
config: Option<Value>Client configuration, as a JSON object, for a fixture whose subject is how the client is configured (a budget, a cache) rather than which call it makes.
~keep The snippet constructs the client through the language’s
client_factory_from_json (see CallOverride) with this value serialized verbatim as a
string literal. It is the complete configuration: nothing is merged into it, so include
the credential and any base URL the factory needs, and base_url/args above do not
apply. Unlike those, it is part of what the fixture tests, so a fixture that declares it
is excluded from the executable e2e suite instead of running against a plain client.
Implementations§
Trait Implementations§
Source§impl Clone for FixtureDocsClient
impl Clone for FixtureDocsClient
Source§impl Debug for FixtureDocsClient
impl Debug for FixtureDocsClient
Source§impl Default for FixtureDocsClient
impl Default for FixtureDocsClient
Source§impl<'de> Deserialize<'de> for FixtureDocsClient
impl<'de> Deserialize<'de> for FixtureDocsClient
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for FixtureDocsClient
Source§impl PartialEq for FixtureDocsClient
impl PartialEq for FixtureDocsClient
Source§impl Serialize for FixtureDocsClient
impl Serialize for FixtureDocsClient
impl StructuralPartialEq for FixtureDocsClient
Auto Trait Implementations§
impl Freeze for FixtureDocsClient
impl RefUnwindSafe for FixtureDocsClient
impl Send for FixtureDocsClient
impl Sync for FixtureDocsClient
impl Unpin for FixtureDocsClient
impl UnsafeUnpin for FixtureDocsClient
impl UnwindSafe for FixtureDocsClient
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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 more