The internal methods (e.g. .isolate()) are used in non nested modules like js::class: https://github.com/neon-bindings/neon/blob/master/src/internal/js/class.rs …
-
-
Replying to @littlecalculist @rustlang
Ah, so you have a trait, and wish that only some methods were public?
1 reply 0 retweets 0 likes -
Replying to @seanmonstar @rustlang
Basically. I think Niko just suggested a workaround that might work:
1 reply 0 retweets 0 likes -
8:43 AM <nmatsakis> `pub(crate) mod internal { use super::*; pub trait Foo { .. } }` really
2 replies 0 retweets 0 likes -
IOW put the internal modules inside and make the *modules* pub(crate) and the *traits* pub
1 reply 0 retweets 0 likes -
The question is whether rustc will catch me doing an end run around it and stab me in the eye
1 reply 0 retweets 0 likes -
Replying to @littlecalculist @rustlang
Nope, that escape hatch is on purpose O_o
1 reply 0 retweets 0 likes -
Replying to @seanmonstar @rustlang
Ah ok! What I missed was that I could make the nested module pub(crate).
2 replies 0 retweets 0 likes -
Replying to @littlecalculist @rustlang
If the module is at the crate root, you don't even need to make it pub(crate), cause all items in the same mod can see their peers.
1 reply 0 retweets 0 likes -
Replying to @seanmonstar @rustlang
Well, neon::js::class wouldn't be able to see a private neon::scope::internal would it?
2 replies 0 retweets 1 like
neon::js::class *could* see neon::internal, for instance
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.