gstruct/elements.go
func MatchElements(identifier Identifier, options Options, elements Elements) types.GomegaMatcher {
	return &ElementsMatcher{
		Identifier:      identifier,
		Elements:        elements,
		IgnoreExtras:    options&IgnoreExtras != 0,
		IgnoreMissing:   options&IgnoreMissing != 0,
		AllowDuplicates: options&AllowDuplicates != 0,
	}
}
func MatchElements(identifier Identifier, options Options, elements Elements) types.GomegaMatcher {
	return &ElementsMatcher{
		Identifier:      identifier,
		Elements:        elements,
		IgnoreExtras:    options&IgnoreExtras != 0,
		IgnoreMissing:   options&IgnoreMissing != 0,
		AllowDuplicates: options&AllowDuplicates != 0,
	}
}
//MatchElements succeeds if each element of a slice matches the element matcher it maps to
//through the id function. It can ignore extra elements and/or missing elements.
//    idFn := func(element interface{}) string {
//        return fmt.Sprintf("%v", element)
//    }
//
//    Expect([]string{"a", "b", "c"}).To(MatchElements(idFn, IgnoreExtras, Elements{
//        "a": Equal("a"),
//        "b": Equal("b"),
//    }))
//    Expect([]string{"a", "c"}).To(MatchElements(idFn, IgnoreMissing, Elements{
//        "a": Equal("a"),
//        "b": Equal("b"),
//        "c": Equal("c"),
//        "d": Equal("d"),
//    }))