pub struct NativeConfig {
pub base_url: String,
pub token: String,
pub client: ClientConfig,
pub on_event: Option<EventSink>,
}Expand description
Configuration for NativeClient.
Fields§
§base_url: StringBase URL the libfw server is mounted at (e.g. https://host:8443).
token: StringBearer token sent with every request.
client: ClientConfigTransfer knobs — identical to the browser SDK’s options.
on_event: Option<EventSink>Optional progress/lifecycle sink.
Implementations§
Source§impl NativeConfig
impl NativeConfig
Sourcepub fn new(
base_url: impl Into<String>,
token: impl Into<String>,
) -> NativeConfig
pub fn new( base_url: impl Into<String>, token: impl Into<String>, ) -> NativeConfig
Build a configuration for base_url + token with client defaults.
Sourcepub fn with_client(self, client: ClientConfig) -> NativeConfig
pub fn with_client(self, client: ClientConfig) -> NativeConfig
Use an explicit ClientConfig.
Sourcepub fn with_events(self, sink: EventSink) -> NativeConfig
pub fn with_events(self, sink: EventSink) -> NativeConfig
Install a progress/lifecycle sink.
Trait Implementations§
Source§impl Clone for NativeConfig
impl Clone for NativeConfig
Auto Trait Implementations§
impl !RefUnwindSafe for NativeConfig
impl !UnwindSafe for NativeConfig
impl Freeze for NativeConfig
impl Send for NativeConfig
impl Sync for NativeConfig
impl Unpin for NativeConfig
impl UnsafeUnpin for NativeConfig
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