Skip to content

Blanket ref impls - #79

Merged
ielis merged 2 commits into
developmentfrom
blanket-ref-impls
Sep 22, 2026
Merged

ielis merged 2 commits into
developmentfrom
blanket-ref-impls

Conversation

@ielis

@ielis ielis commented Sep 22, 2026

Copy link
Copy Markdown
Owner

Ontolius provides multiple traits that only take &self (shared reference) as a receiver. For these traits, it is possible to implement the trait also for &'_ T where T: Trait as well as for Box<T> where T: Trait.

Previously, the traits were implemented for references or boxed instances of specific types (e.g. &'_ CsrOntology). However, it is preferable to implement the traits with blanket implementations because we do not expect the traits to ever require a &mut self or self receiver.

This PR provides the blanket implementations for 95% of the most commonly used ontolius' traits. The rest will be implemented on a per-user request basis.

@ielis
ielis merged commit 5c8f657 into development Sep 22, 2026
5 checks passed
@ielis
ielis deleted the blanket-ref-impls branch September 22, 2026 09:11
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.

1 participant