pub fn from_object(object: &Object) -> Option<Class> {
        if object.has_root() {
            Some(Class::Root)
        } else if object.has_domain() {
            Some(Class::Domain)
        } else if object.has_org_unit() {
            Some(Class::OrgUnit)
        } else if object.has_system() {
            Some(Class::System)
        } else if object.has_credential() {
            Some(Class::Credential)
        } else {
            None
        }
    }
/// Obtain the class associated with a given object
Obtain the class associated with a given object
Obtain the class associated with a given object
pub fn from_object(object: &Object) -> Option<Class> {
        if object.has_root() {
            Some(Class::Root)
        } else if object.has_domain() {
            Some(Class::Domain)
        } else if object.has_org_unit() {
            Some(Class::OrgUnit)
        } else if object.has_system() {
            Some(Class::System)
        } else if object.has_credential() {
            Some(Class::Credential)
        } else {
            None
        }
    }
pub fn from_object ( object : & Object ) -> Option < Class > { if object . has_root ( ) { Some ( Class :: Root ) } else if object . has_domain ( ) { Some ( Class :: Domain ) } else if object . has_org_unit ( ) { Some ( Class :: OrgUnit ) } else if object . has_system ( ) { Some ( Class :: System ) } else if object . has_credential ( ) { Some ( Class :: Credential ) } else { None } }
Obtain the class associated with a given object
Obtain the class associated with a given object
object
&Object
object
&Object