Skip to main content

vine_subscribe_notifications

Function vine_subscribe_notifications 

Source
pub async fn vine_subscribe_notifications(
    channel: Channel<NotificationFramePayload>,
) -> Result<usize, String>
Expand description

Subscribe to the Vine notification broadcast. Each call returns a fresh subscription (own broadcast::Receiver) and spawns a tokio task that drains the receiver onto the supplied Tauri Channel until the webview drops it. Drop-oldest at capacity 4096; slow subscribers may see gaps but never block the producer.

Returns the current subscriber count (post-subscribe) so the frontend can verify the channel is registered.