pub struct LegacySingleInstanceNames {
pub windows_mutex: String,
pub windows_window_class: String,
pub windows_window_title: String,
pub macos_socket: PathBuf,
pub linux_dbus_name: String,
}Expand description
Every name tauri-plugin-single-instance 2.x derives from the Tauri identifier
(tauri.conf.json identifier). Read from plugin versions 2.4.2 and 2.4.3
(src/platform_impl/{windows,macos,linux}.rs), with the plugin’s semver feature off. HeardRight
confirmed the names at its locked 2.4.5 (verified by the consumer; 2.4.5 source was not read here). The
derivation is pure, so it is the same on every host.
For HeardRight (app.heardright.next):
| Platform | Resource | Name |
|---|---|---|
| Windows | named mutex | app.heardright.next-sim |
| Windows | window class | app.heardright.next-sic |
| Windows | window title | app.heardright.next-siw |
| macOS | unix socket | /tmp/app_heardright_next_si.sock |
| Linux | D-Bus well-known name | app.heardright.next.SingleInstance |
Fields§
§windows_mutex: StringWindows: <identifier>-sim, verbatim. The mutex that arbitrates the claim.
windows_window_class: StringWindows: <identifier>-sic, verbatim. The class of the hidden window that receives
WM_COPYDATA (dwData == 1542).
windows_window_title: StringWindows: <identifier>-siw, verbatim. The title of that window.
macos_socket: PathBufmacOS: /tmp/<identifier>_si.sock, with every . and - in the identifier replaced by _.
linux_dbus_name: StringLinux: <identifier>.SingleInstance, verbatim. This crate does not probe it.
Implementations§
Source§impl LegacySingleInstanceNames
impl LegacySingleInstanceNames
Sourcepub fn for_identifier(identifier: &str) -> Self
pub fn for_identifier(identifier: &str) -> Self
Derive the names for a Tauri identifier.
Trait Implementations§
Source§impl Clone for LegacySingleInstanceNames
impl Clone for LegacySingleInstanceNames
Source§impl Debug for LegacySingleInstanceNames
impl Debug for LegacySingleInstanceNames
impl Eq for LegacySingleInstanceNames
impl StructuralPartialEq for LegacySingleInstanceNames
Auto Trait Implementations§
impl Freeze for LegacySingleInstanceNames
impl RefUnwindSafe for LegacySingleInstanceNames
impl Send for LegacySingleInstanceNames
impl Sync for LegacySingleInstanceNames
impl Unpin for LegacySingleInstanceNames
impl UnsafeUnpin for LegacySingleInstanceNames
impl UnwindSafe for LegacySingleInstanceNames
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.