Add is_empty method to Roles
This commit is contained in:
parent
7264e64a4a
commit
d256ac7074
@ -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()))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user