pub fn validate(&self, kind: ResourceKind) -> ZxResult {
        if self.kind == kind || self.kind == ResourceKind::ROOT {
            Ok(())
        } else {
            Err(ZxError::WRONG_TYPE)
        }
    }
/// Validate the resource is the given kind or it is the root resource.
Validate the resource is the given kind or it is the root resource.
Validate the resource is the given kind or it is the root resource .
pub fn validate(&self, kind: ResourceKind) -> ZxResult {
        if self.kind == kind || self.kind == ResourceKind::ROOT {
            Ok(())
        } else {
            Err(ZxError::WRONG_TYPE)
        }
    }
pub fn validate ( & self , kind : ResourceKind ) -> ZxResult { if self . kind == kind || self . kind == ResourceKind :: ROOT { Ok ( ( ) ) } else { Err ( ZxError :: WRONG_TYPE ) } }
Validate the resource is the given kind or it is the root resource.
Validate the resource is the given kind or it is the root resource .
&self
kind
ResourceKind
&self
kind
ResourceKind