Skip to content

Change unlink and disconnect reasons to enums#1485

Open
jhash wants to merge 7 commits into
cBournhonesque:mainfrom
jhash:jh/unlink-reason-enums
Open

Change unlink and disconnect reasons to enums#1485
jhash wants to merge 7 commits into
cBournhonesque:mainfrom
jhash:jh/unlink-reason-enums

Conversation

@jhash

@jhash jhash commented May 24, 2026

Copy link
Copy Markdown
Contributor

#1376

New to the project and would love feedback and tips!

/// [`Unlinked`] component and propagates its [`UnlinkReason`] upward.
LinkFailed(UnlinkReason),
/// The local side explicitly requested a disconnect.
UserRequested,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to optionally provide a reason string here

#[component(on_add = Disconnected::on_add)]
pub struct Disconnected {
pub reason: Option<String>,
pub reason: Option<DisconnectedReason>,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we cover all cases in the enum, maybe we can remove the Option here and just store the enum?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants