Closed 6d7a closed 4 months ago
Thank you for your PR! Though I wonder if we should instead generate null from these kinds of structs instead of a delegate, I don't see where the empty sequences for unit structs are useful.
From the top of my head 😄 , ISO8571-FTAM contains some empty sequences. I guess it's better to be explicit with the null delegate.
Sure, but I guess I would consider the syntax for empty sequences to be the following, where it's defined to have fields, it's just the fields are empty.
struct FBeginGroupResponse {}
Where as in Rust the syntax we're using currently is called a "unit struct" meaning that semantically it is identical to ()
, but it is a better description of a single value.
struct UnbindRequest;
I see, makes sense. Should we move that refactor to a separate issue? By the way, do you think we can go ahead with PR #159?
Should we move that refactor to a separate issue?
I'm not sure what you mean, fixing that should resolve the same issue right?
I adapted the macros so that unit structs are now interpreted as ASN.1 NULL.
Thank you for your PR!
Closes #225
Replaces the empty struct of
rasn_ldap::UnbindRequest
with a null delegate. @michaldrabina we use rust's unit value()
as an equivalent for ASN.1'sNULL
value. That way, you can simply use thedelegate
annotation. I couldn't see that it breaks any existing code, but let me know in case. Thanks for the issue!