Skip to main content

from_outside

Function from_outside 

Source
pub fn from_outside<Message>(
    path: Option<PathBuf>,
    toggle: Message,
) -> impl Stream<Item = Message>
where Message: Clone + Send + 'static,
Expand description

What is said to the window from outside, at the socket path, as the window hears it: each toggle. Nothing, ever, if there is no path.

One window listens there, and it is this one whenever no other does. It looks every LOOKED_AT_EVERY: a window that finds another listening leaves the socket to it, and takes it once that one is gone; one whose socket file was taken away from under it, or replaced by one that answers to nobody, listens anew. So the socket is never left with a window running and none hearing, whatever else was started and stopped beside it, and whatever was deleted.

Nothing is taken away when the window leaves. A socket file with nobody behind it is in nobody’s way: the next window replaces it. And taking it away is how a window that leaves late would take away the socket of the one started after it.