Skip to main content

PluginConfig

Struct PluginConfig 

Source
pub struct PluginConfig {
    pub ios_safety_timeout_secs: f64,
    pub ios_cancel_listener_timeout_secs: u64,
    pub ios_processing_safety_timeout_secs: f64,
    pub ios_earliest_refresh_begin_minutes: f64,
    pub ios_earliest_processing_begin_minutes: f64,
    pub ios_requires_external_power: bool,
    pub ios_requires_network_connectivity: bool,
    pub channel_capacity: usize,
    pub desktop_service_mode: String,
    pub desktop_service_label: Option<String>,
}
Expand description

Plugin-level configuration, deserialized from the Tauri plugin config.

Fields§

§ios_safety_timeout_secs: f64

iOS safety timeout in seconds for the expiration handler. Default: 28.0 (Apple recommends keeping BG tasks under ~30s).

§ios_cancel_listener_timeout_secs: u64

iOS cancel listener timeout in seconds. Default: 14400 (4 hours). Balances leak risk vs. service lifetime.

§ios_processing_safety_timeout_secs: f64

iOS BGProcessingTask safety timeout in seconds. Default: 0.0 (no cap). Processing tasks can run for minutes/hours, so unlike BGAppRefreshTask (28s default), this defaults to uncapped. Set to a positive value to impose a hard cap on processing task duration.

§ios_earliest_refresh_begin_minutes: f64

iOS BGAppRefreshTask earliest begin date in minutes from now. Default: 15.0. Controls how soon iOS can launch the refresh task.

§ios_earliest_processing_begin_minutes: f64

iOS BGProcessingTask earliest begin date in minutes from now. Default: 15.0. Controls how soon iOS can launch the processing task.

§ios_requires_external_power: bool

iOS BGProcessingTask requires external power. Default: false. When true, iOS only launches the processing task while the device is connected to power.

§ios_requires_network_connectivity: bool

iOS BGProcessingTask requires network connectivity. Default: false. When true, iOS only launches the processing task when the device has network access.

§channel_capacity: usize

Capacity for the manager command channel (mpsc). Default: 16. Increase for high-throughput scenarios with many concurrent start/stop/is-running calls.

§desktop_service_mode: String

Desktop service mode: “inProcess” (default) or “osService”. Controls whether the background service runs in-process or as a registered OS service/daemon.

§desktop_service_label: Option<String>

Optional custom label for the desktop OS service registration. When None, the label is auto-derived from the app identifier.

Trait Implementations§

Source§

impl Clone for PluginConfig

Source§

fn clone(&self) -> PluginConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PluginConfig

Source§

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

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

impl Default for PluginConfig

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for PluginConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for PluginConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<'de, D, R> CommandArg<'de, R> for D
where D: Deserialize<'de>, R: Runtime,

Source§

fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>

Derives an instance of Self from the CommandItem. 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> IpcResponse for T
where T: Serialize,

Source§

fn body(self) -> Result<InvokeResponseBody, Error>

Resolve the IPC response body.
Source§

impl<T> NoneValue for T
where T: Default,

Source§

type NoneType = T

Source§

fn null_value() -> T

The none-equivalent value.
Source§

impl<T> ScopeObject for T
where T: Send + Sync + Debug + DeserializeOwned + 'static,

Source§

type Error = Error

The error type.
Source§

fn deserialize<R>( _app: &AppHandle<R>, raw: Value, ) -> Result<T, <T as ScopeObject>::Error>
where R: Runtime,

Deserialize the raw scope value.
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> UserEvent for T
where T: Debug + Clone + Send + 'static,