Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Implement ExternalValue#96

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Caellian wants to merge3 commits intocel-rust:master
base:master
Choose a base branch
Loading
fromCaellian:dev/extern-types

Conversation

Caellian
Copy link
Contributor

This is initial implementation that adds support forabstract-types.

Not well tested (or at all).

I'm mostly creating this to provide an exhaustive example that compiles.

Couldclose#93 with some additional work, or be used for top levelValue trait mentioned in#76.

clarkmcc and JonasHedEng reacted with hooray emojiclarkmcc reacted with eyes emoji
@CaellianCaellian changed the titleImplement ExternalValue (#93)Implement ExternalValueOct 15, 2024
This is initial implementation. It's not well tested.Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@Caellian
Copy link
ContributorAuthor

Caellian commentedOct 15, 2024
edited
Loading

After reading through spec a little. Abstract values are opaque and their members can't be accessed. The addedExternalValue struct allows working in both opaque and non-opaque modes, so I just documented this distinction.

It will default to non-opaque mode if type implementsAsValue. Otherwise, an opaque value can always be constructed.

Also, the drop logic I used is something I already tested in another crate with Miri, so itshould work.

Oh, and CEL is designed for use with protobuf, so what#81 is doing might be a better fit. I'll probably fork off with these changes into a different crate if I get really invested in this because my use case calls for a lot of things that go against or aren't aligned with the spec.

@CaellianCaellian marked this pull request as draftOctober 17, 2024 16:54
@CaellianCaellian mentioned this pull requestOct 17, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Generic abstract type support
1 participant
@Caellian

[8]ページ先頭

©2009-2025 Movatter.jp