Add is_empty method to Roles
This commit is contained in:
parent
8a95dbffda
commit
1929153e8c
@ -482,6 +482,10 @@ impl Roles {
|
|||||||
Roles(roles)
|
Roles(roles)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn is_empty(&self) -> bool {
|
||||||
|
self.0.is_empty()
|
||||||
|
}
|
||||||
|
|
||||||
pub fn to_bytes(&self) -> Result<Vec<u8>> {
|
pub fn to_bytes(&self) -> Result<Vec<u8>> {
|
||||||
serde_json::to_vec(&self.0).map_err(|e| Error::msg(e.to_string()))
|
serde_json::to_vec(&self.0).map_err(|e| Error::msg(e.to_string()))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user