// EnumLinks collects all links in the Shard.
EnumLinks collects all links in the Shard.
// EnumLinks collects all links in the Shard .
func (ds *Shard) EnumLinks(ctx context.Context) ([]*ipld.Link, error) {
	var links []*ipld.Link
	linkResults := ds.EnumLinksAsync(ctx)
	for linkResult := range linkResults {
		if linkResult.Err != nil {
			return links, linkResult.Err
		}
		links = append(links, linkResult.Link)
	}
	return links, nil
}
func ( ds * Shard ) EnumLinks ( ctx context . Context ) ( [ ] * ipld . Link , error ) { var links [ ] * ipld . Link linkResults := ds . EnumLinksAsync ( ctx ) for linkResult := range linkResults { if linkResult . Err != nil { return links , linkResult . Err } links = append ( links , linkResult . Link ) } return links , nil }
EnumLinks collects all links in the Shard.
EnumLinks collects all links in the Shard .