Helpt to understand 'string' must be a non-nullable and generic method : I have few questions in the following method. Can an expert help me to understand the structure and why I am getting the error?

I have this method that will get a xml element, search the attribute specified in name parameter and case is can't find in the xml, it returns the default value:

    protected static T GetValue<T>(XElement group, string name, T default)     where T : struct
    {
    			//Removed some code for better view
    			XAttribute setting = group.Attribute(name);
                return setting == null ? default: (T)Enum.Parse(typeof(T), setting.Value);
    }

My questions is about the generic types used in this method. When I try to use this method in a string variable, I get the following error:

    string test = GetValue(element, "search", "default value");
    The type 'string' must be a non-nullable value type in order to use it as parameter 'T' in the generic type or method 'GetValue<T>(XElement, string, T)'	

What T is this method it the issue that I am getting that error? What does where T : struct mean? I tried to use this as GetValue<String> and it did not work as well...

Any help are really welcome! Thanks!