Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

feature request: Annotating traits for attaching tags #1224

Closed
mimoo opened this issue Jul 19, 2023 · 3 comments
Closed

feature request: Annotating traits for attaching tags #1224

mimoo opened this issue Jul 19, 2023 · 3 comments

Comments

@mimoo
Copy link

mimoo commented Jul 19, 2023

Hello hello.

I see that I can detect tags on a trait implementation easily, but I'd like to do the reverse: I'd like to call add_tag!(&value_to_be_tagged, SecretTaint); automatically on the output values of a trait method definition (so that any implementors also get their outputs tagged).

Is this possible?

@mimoo
Copy link
Author

mimoo commented Jul 19, 2023

I see that actually, using #[contract_trait] doesn't work well with existing libraries that are already being implemented a certain way :c it'd be nice to have a way to insert pre or post conditions on all implementations of a trait method. But I don't see a way to do this yeah...

@hermanventer
Copy link
Contributor

I don't think there is an easy way to implement this feature, which means that I also don't think I'll be the one to implement it, if it ever gets implemented.

@mimoo
Copy link
Author

mimoo commented Aug 11, 2023

yeah that makes sense :] feel free to close!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants