SyncConfigBuilder

Struct SyncConfigBuilder 

Source
pub struct SyncConfigBuilder { /* private fields */ }
Expand description

Builder for sync configuration

Implementations§

Source§

impl SyncConfigBuilder

Source

pub fn new() -> Self

Create a new builder

Source

pub fn endpoint(self, endpoint: impl Into<String>) -> Self

Set the API endpoint (default: production)

Source

pub fn use_staging(self) -> Self

Use staging endpoint for testing

Source

pub fn org_id(self, org_id: impl Into<String>) -> Result<Self>

Set organization ID

Source

pub fn org_id_uuid(self, org_id: Uuid) -> Self

Set organization ID from UUID

Source

pub fn app_id(self, app_id: impl Into<String>) -> Result<Self>

Set application ID

Source

pub fn app_id_uuid(self, app_id: Uuid) -> Self

Set application ID from UUID

Source

pub fn token(self, token: impl Into<String>) -> Self

Set API token

Source

pub fn secret(self, secret: impl Into<String>) -> Self

Set API secret

Source

pub fn batch_size(self, batch_size: usize) -> Self

Set batch size (1-1000)

Source

pub fn max_retries(self, max_retries: u32) -> Self

Set maximum retry attempts

Source

pub fn sync_interval_secs(self, interval: u64) -> Self

Set sync interval in seconds (0 = manual only)

Source

pub fn respect_dnt(self, respect: bool) -> Self

Enable/disable DNT (Do Not Track) check

Source

pub fn build(self) -> Result<SyncConfig>

Build the configuration

Trait Implementations§

Source§

impl Debug for SyncConfigBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SyncConfigBuilder

Source§

fn default() -> SyncConfigBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more