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

Add converters from C to Rust for ontology objects #135

Merged
merged 4 commits into from
Apr 8, 2019

Conversation

anthonyray
Copy link
Contributor

@anthonyray anthonyray commented Apr 4, 2019

Hi guys,
I needed conversion methods for Slots. The conversions from C to Rust object where missing for Slot objects.

I also took the initiative to introduce the very practical trait : AsRust, and thus diverge from implementing the From trait.

I also took the liberty to introduce failure as a dependency, so that we are consistent across crates.

Let me know if I need to fix somethin.

ffi/ffi-macros/src/ontology.rs Outdated Show resolved Hide resolved
ffi/ffi-macros/src/ontology.rs Outdated Show resolved Hide resolved
ffi/ffi-macros/src/ontology.rs Outdated Show resolved Hide resolved
ffi/ffi-macros/src/ontology.rs Show resolved Hide resolved
ffi/ffi-macros/src/ontology.rs Show resolved Hide resolved
ffi/ffi-macros/src/ontology.rs Outdated Show resolved Hide resolved
@adrienball
Copy link
Collaborator

Now that you have implemented AsRust, you can add some round trip unit tests in rust.

@anthonyray anthonyray requested a review from adrienball April 8, 2019 14:21
@anthonyray anthonyray force-pushed the task/c_slot_conversion branch from 435613a to 22d700c Compare April 8, 2019 14:41
Copy link
Collaborator

@adrienball adrienball left a comment

Choose a reason for hiding this comment

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

Last small detail, otherwise LGTM !

ffi/ffi-macros/src/ontology.rs Show resolved Hide resolved
@anthonyray anthonyray requested a review from adrienball April 8, 2019 15:09
@adrienball adrienball merged commit 8a4aa0e into develop Apr 8, 2019
@adrienball adrienball deleted the task/c_slot_conversion branch April 8, 2019 15:16
@adrienball adrienball changed the title adds conversion function from C to Rust object for CSlot and CSlotValue. Add converters from C to Rust for ontology objects Apr 8, 2019
@adrienball adrienball mentioned this pull request Apr 8, 2019
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