func (p SecGroupRulePage) IsEmpty() (bool, error) {
	is, err := ExtractRules(p)
	if err != nil {
		return true, nil
	}
	return len(is) == 0, nil
}
IsEmpty checks whether a SecGroupRulePage struct is empty.
package rules
import (
	"github.com/mitchellh/mapstructure"
	"github.com/rackspace/gophercloud"
	"github.com/rackspace/gophercloud/pagination"
)
type SecGroupRule struct {
	ID string
	Direction string
	EtherType string `json:"ethertype" mapstructure:"ethertype"`
	SecGroupID string `json:"security_group_id" mapstructure:"security_group_id"`
	PortRangeMin int `json:"port_range_min" mapstructure:"port_range_min"`
	PortRangeMax int `json:"port_range_max" mapstructure:"port_range_max"`
	Protocol string
	RemoteGroupID string `json:"remote_group_id" mapstructure:"remote_group_id"`
	RemoteIPPrefix string `json:"remote_ip_prefix" mapstructure:"remote_ip_prefix"`
	TenantID string `json:"tenant_id" mapstructure:"tenant_id"`
}
type SecGroupRulePage struct {
	pagination.LinkedPageBase
}
func (p SecGroupRulePage) NextPageURL() (string, error) {
	type resp struct {
		Links []gophercloud.Link `mapstructure:"security_group_rules_links"`
	}
	var r resp
	err := mapstructure.Decode(p.Body, &r)
	if err != nil {
		return "", err
	}
	return gophercloud.ExtractNextURL(r.Links)
}