pub struct ServerCommunicationConfigClient {
client: ServerCommunicationConfigClient<UniffiRepositoryBridge<Arc<dyn ServerCommunicationConfigRepository>>, UniffiPlatformApiBridge<Arc<dyn ServerCommunicationConfigPlatformApi>>>,
}Expand description
UniFFI wrapper for ServerCommunicationConfigClient
Fields§
§client: ServerCommunicationConfigClient<UniffiRepositoryBridge<Arc<dyn ServerCommunicationConfigRepository>>, UniffiPlatformApiBridge<Arc<dyn ServerCommunicationConfigPlatformApi>>>Implementations§
Source§impl ServerCommunicationConfigClient
impl ServerCommunicationConfigClient
Sourcepub async fn get_config(
&self,
domain: String,
) -> Result<ServerCommunicationConfig>
pub async fn get_config( &self, domain: String, ) -> Result<ServerCommunicationConfig>
Retrieves the server communication configuration for a domain
Sourcepub async fn needs_bootstrap(&self, domain: String) -> bool
pub async fn needs_bootstrap(&self, domain: String) -> bool
Determines if cookie bootstrapping is needed for this domain
Returns all cookies that should be included in requests to this server
Sourcepub async fn set_communication_type(
&self,
domain: String,
request: SetCommunicationTypeRequest,
) -> Result<()>
👎Deprecated: Use set_communication_type_v2() instead, which extracts the domain from the config
pub async fn set_communication_type( &self, domain: String, request: SetCommunicationTypeRequest, ) -> Result<()>
Sets the server communication configuration for a domain
This method saves the provided communication configuration to the repository.
Typically called when receiving the /api/config response from the server.
Previously acquired cookies are preserved automatically.
Sourcepub async fn set_communication_type_v2(
&self,
request: SetCommunicationTypeRequest,
) -> Result<()>
pub async fn set_communication_type_v2( &self, request: SetCommunicationTypeRequest, ) -> Result<()>
Sets the server communication configuration using the domain from the config
Extracts the cookie_domain from the SsoCookieVendor config and uses it as the
storage key. If the config is Direct or cookie_domain is not set, the call
is silently ignored.
Acquires a cookie from the platform and saves it to the repository
Trait Implementations§
Source§impl<UT> LiftRef<UT> for ServerCommunicationConfigClient
impl<UT> LiftRef<UT> for ServerCommunicationConfigClient
Source§impl<UT> LowerError<UT> for ServerCommunicationConfigClient
impl<UT> LowerError<UT> for ServerCommunicationConfigClient
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for ServerCommunicationConfigClient
impl<UT> LowerReturn<UT> for ServerCommunicationConfigClient
Source§type ReturnType = <Arc<ServerCommunicationConfigClient> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<ServerCommunicationConfigClient> as LowerReturn<UniFfiTag>>::ReturnType
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl<UT> TypeId<UT> for ServerCommunicationConfigClient
impl<UT> TypeId<UT> for ServerCommunicationConfigClient
const TYPE_ID_META: MetadataBuffer
Auto Trait Implementations§
impl Freeze for ServerCommunicationConfigClient
impl !RefUnwindSafe for ServerCommunicationConfigClient
impl Send for ServerCommunicationConfigClient
impl Sync for ServerCommunicationConfigClient
impl Unpin for ServerCommunicationConfigClient
impl UnsafeUnpin for ServerCommunicationConfigClient
impl !UnwindSafe for ServerCommunicationConfigClient
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> 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> 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