Skip to content

How would I implement a trait within an engine and change plugin function signature? #956

Answered by schungx
gitstashpop asked this question in Q&A
Discussion options

You must be logged in to vote

Not very sure what you want to achieve... It seems to be working for you, correct?

If your function differs from the implementation in number of parameters, then you must obviously provide the missing arguments somehow. In your example you capture it in a closure.

This is very proper way to do things in Rust. They are different functions afterall...

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by gitstashpop
Comment options

You must be logged in to vote
1 reply
@schungx
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants