Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to create ParticipantSid from String in user module (#250) #251

Conversation

trzeciak
Copy link
Contributor

Hey, I want test/use this livekit-rust-sdk in c++ code.
To do this I create internal-rust-layer to expose some functionality, and extract it to c++.
I came across a problem to create ParticipantSid from String in user module,
therefore i purpose to add 'pub' in declaration of ParticipantSid.
Do you think it is ok, or I should choose other way?

@CLAassistant
Copy link

CLAassistant commented Nov 29, 2023

CLA assistant check
All committers have signed the CLA.

@theomonnom theomonnom self-requested a review November 29, 2023 19:14
@theomonnom
Copy link
Member

Hey, to ensure type safety of ParticipantSid, the String must always start with PA_. This is why you can't directly create from a String.
Instead you can do ParticipantSid::try_from(my_string).unwrap()

@trzeciak
Copy link
Contributor Author

trzeciak commented Dec 8, 2023

Thanks for the explanation, I will follow it 👍

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.

3 participants