Hi Harish,
Have you reviewed the “YANG manual” , i.e. RFC 7950 https://tools.ietf.org/html/rfc7950#section-7.7 ?
For example the leaf-list statement is covered in detail there together with some nice examples.
For your struct use-case I would use a list with two keys:.
list structA {
key "a b";
leaf a {
type int32;
}
leaf b {
type int32;
}
}