pub fn contains(&self, object: &GrantObject) -> bool {
        match (self, object) {
            (GrantObject::Global, _) => true,
            (GrantObject::Database(_), GrantObject::Global) => false,
            (GrantObject::Database(lhs), GrantObject::Database(rhs)) => lhs == rhs,
            (GrantObject::Database(lhs), GrantObject::Table(rhs, _)) => lhs == rhs,
            (GrantObject::Table(lhs_db, lhs_table), GrantObject::Table(rhs_db, rhs_table)) => {
                (lhs_db == rhs_db) && (lhs_table == rhs_table)
            }
            (GrantObject::Table(_, _), _) => false,
        }
    }
/// Comparing the grant objects, the Database object contains all the Table objects inside it.
/// Global object contains all the Database objects.
Comparing the grant objects, the Database object contains all the Table objects inside it.
Global object contains all the Database objects.
Comparing the grant objects the Database object contains all the Table objects inside it . Global object contains all the Database objects .
pub fn contains(&self, object: &GrantObject) -> bool {
        match (self, object) {
            (GrantObject::Global, _) => true,
            (GrantObject::Database(_), GrantObject::Global) => false,
            (GrantObject::Database(lhs), GrantObject::Database(rhs)) => lhs == rhs,
            (GrantObject::Database(lhs), GrantObject::Table(rhs, _)) => lhs == rhs,
            (GrantObject::Table(lhs_db, lhs_table), GrantObject::Table(rhs_db, rhs_table)) => {
                (lhs_db == rhs_db) && (lhs_table == rhs_table)
            }
            (GrantObject::Table(_, _), _) => false,
        }
    }
pub fn contains ( & self , object : & GrantObject ) -> bool { match ( self , object ) { ( GrantObject :: Global , _ ) => true , ( GrantObject :: Database ( _ ) , GrantObject :: Global ) => false , ( GrantObject :: Database ( lhs ) , GrantObject :: Database ( rhs ) ) => lhs == rhs , ( GrantObject :: Database ( lhs ) , GrantObject :: Table ( rhs , _ ) ) => lhs == rhs , ( GrantObject :: Table ( lhs_db , lhs_table ) , GrantObject :: Table ( rhs_db , rhs_table ) ) => { ( lhs_db == rhs_db ) && ( lhs_table == rhs_table ) } ( GrantObject :: Table ( _ , _ ) , _ ) => false , } }
Comparing the grant objects, the Database object contains all the Table objects inside it.
Comparing the grant objects the Database object contains all the Table objects inside it .
&self
object
&GrantObject