pub struct Options {
pub url: String,
pub instance: String,
pub no_detect_instance: bool,
pub platform_token_source: Option<SharedTokenSource>,
pub token_source: Option<SharedTokenSource>,
pub user_agent: String,
}Expand description
Configures a Client.
Fields§
§url: StringThe sandbox plane’s URL, e.g. https://sessions.chainbox.dev or http://localhost:8080
(plaintext). Defaults to $CHAINCTL_SESSIONS_URL, then DEFAULT_URL.
instance: StringThe organization ID, used as “instances/{instance}”. If empty, $CHAINCTL_SANDBOX_INSTANCE
is used; if that is empty too, the organization is auto-detected (see
detect_instance) unless no_detect_instance is set.
no_detect_instance: boolTurns off organization auto-detection (also $CHAINGUARD_SANDBOX_NO_DETECT_INSTANCE=1).
platform_token_source: Option<SharedTokenSource>Mints account-API tokens for auto-detection. Defaults to platform_token_source when
token_source is unset and $CHAINCTL_AUTH_TOKEN is empty; otherwise detection needs it.
token_source: Option<SharedTokenSource>Supplies bearer tokens for DEFAULT_AUDIENCE. Defaults to
default_token_source.
user_agent: StringSent with every call (default DEFAULT_USER_AGENT).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Options
impl !RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl !UnwindSafe for Options
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].