liranringel / structure

Use format strings to create strongly-typed data pack/unpack interfaces
Apache License 2.0
62 stars 4 forks source link

Expose method for struct size calculation? #7

Closed brenapp closed 4 years ago

brenapp commented 4 years ago

Would it be possible to include an equivalent to struct.calcsize in python? Looking at the source, it seems like all that's needed is exposing the calc_size function in the crate.

Do you have plans to do this?

brenapp commented 4 years ago

Nevermind, I was able to find the .size() in the impl block. Thank you!