Replies: 1 comment
-
|
The definition of OrderedDict is mutable struct OrderedDict{K,V} <: AbstractDict{K,V}
slots::Array{Int32,1}
keys::Array{K,1}
vals::Array{V,1}
ndel::Int
maxprobe::Int
dirty::Bool
endWhich should map to #[repr(C)]
struct OrderedDict<'scope, 'data> {
slots: Option<ArrayRef<'scope, 'data>>,
keys: Option<ArrayRef<'scope, 'data>>,
vals: Option<ArrayRef<'scope, 'data>>,
ndel: isize,
maxprobe: isize,
dirty: Bool,
}in Rust. In practice, though, I think it's easier to use a field accessor here to access the particular field you're interested in. In either case you depend on implementation details of OrderedDict, though, but directly accessing the field should perform significantly better than calling Julia functions to access it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello again,
I would like to know if there is some easy way to unbox values from julia OrderedDict type of parameter. I have a function in julia that returns OrderedDict where I have data in timeseries format and I would like to use that data in rust. What would be the best way to do that and can I have an example?
Beta Was this translation helpful? Give feedback.
All reactions