Skip to main content

ClaimOutcome

Enum ClaimOutcome 

Source
pub enum ClaimOutcome {
    Primary(SingleInstanceGuard),
    Forwarded,
    Failed(ClaimFailure),
}
Expand description

The typed result of SingleInstance::claim.

Variants§

§

Primary(SingleInstanceGuard)

This process is the primary. Keep the guard alive.

§

Forwarded

A live primary accepted this launch’s message. Exit.

For a legacy tauri-plugin-single-instance holder on macOS the plugin has no reply, so “accepted” means it read the launch to its end and closed the connection, or, when it stayed silent for 2 s, that its socket belongs to this app’s own process. That silent case cannot be told from a slow callback, so it is still Forwarded but is logged loudly on stderr as “forwarded but NOT confirmed”. A socket whose owning process has exited, or belongs to another program and never answers, is not a holder (a descriptor leaked into a sidecar can keep such a socket accepting after the app is gone): the claim carries on and this process can become the primary.

§

Failed(ClaimFailure)

Arbitration could not be decided. Do not continue as a primary.

Implementations§

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, 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.