pub struct JsServerCommunicationConfigClient {
client: ServerCommunicationConfigClient<JsServerCommunicationConfigRepository>,
}Expand description
JavaScript wrapper for ServerCommunicationConfigClient
This provides TypeScript access to the server communication configuration client, allowing clients to check bootstrap requirements and retrieve cookies for HTTP requests.
Fields§
§client: ServerCommunicationConfigClient<JsServerCommunicationConfigRepository>Implementations§
Source§impl JsServerCommunicationConfigClient
impl JsServerCommunicationConfigClient
Sourcepub fn new(repository: RawJsServerCommunicationConfigRepository) -> Self
pub fn new(repository: RawJsServerCommunicationConfigRepository) -> Self
Creates a new ServerCommunicationConfigClient with a JavaScript repository
The repository should be backed by StateProvider (or equivalent storage mechanism) for persistence.
§Arguments
repository- JavaScript implementation of the repository interface
Sourcepub async fn get_config(
&self,
hostname: String,
) -> Result<ServerCommunicationConfig, String>
pub async fn get_config( &self, hostname: String, ) -> Result<ServerCommunicationConfig, String>
Sourcepub async fn needs_bootstrap(&self, hostname: String) -> bool
pub async fn needs_bootstrap(&self, hostname: String) -> bool
Determines if cookie bootstrapping is needed for this hostname
§Arguments
hostname- The server hostname (e.g., “vault.acme.com”)
Returns all cookies that should be included in requests to this server
Returns an array of [cookie_name, cookie_value] pairs.
§Arguments
hostname- The server hostname (e.g., “vault.acme.com”)
Trait Implementations§
Source§impl From<JsServerCommunicationConfigClient> for JsValue
impl From<JsServerCommunicationConfigClient> for JsValue
Source§fn from(value: JsServerCommunicationConfigClient) -> Self
fn from(value: JsServerCommunicationConfigClient) -> Self
Converts to this type from the input type.
Source§impl RefFromWasmAbi for JsServerCommunicationConfigClient
impl RefFromWasmAbi for JsServerCommunicationConfigClient
Source§type Anchor = RcRef<JsServerCommunicationConfigClient>
type Anchor = RcRef<JsServerCommunicationConfigClient>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl VectorFromWasmAbi for JsServerCommunicationConfigClient
impl VectorFromWasmAbi for JsServerCommunicationConfigClient
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: Self::Abi, ) -> Box<[JsServerCommunicationConfigClient]>
Source§impl VectorIntoWasmAbi for JsServerCommunicationConfigClient
impl VectorIntoWasmAbi for JsServerCommunicationConfigClient
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[JsServerCommunicationConfigClient]>, ) -> Self::Abi
impl SupportsConstructor for JsServerCommunicationConfigClient
impl SupportsInstanceProperty for JsServerCommunicationConfigClient
impl SupportsStaticProperty for JsServerCommunicationConfigClient
Auto Trait Implementations§
impl Freeze for JsServerCommunicationConfigClient
impl RefUnwindSafe for JsServerCommunicationConfigClient
impl Send for JsServerCommunicationConfigClient
impl Sync for JsServerCommunicationConfigClient
impl Unpin for JsServerCommunicationConfigClient
impl UnwindSafe for JsServerCommunicationConfigClient
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
Mutably borrows from an owned value. Read more
§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>
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.