Add is_empty method to Roles

This commit is contained in:
NicolasCantu 2025-06-06 12:47:55 +02:00
parent 7264e64a4a
commit d256ac7074

View File

@ -482,6 +482,10 @@ impl Roles {
Roles(roles)
}
pub fn is_empty(&self) -> bool {
self.0.is_empty()
}
pub fn to_bytes(&self) -> Result<Vec<u8>> {
serde_json::to_vec(&self.0).map_err(|e| Error::msg(e.to_string()))
}