pub struct Macaroon {
pub root_key_id: String,
pub identifier: String,
pub caveats: Vec<Caveat>,
pub signature: String,
}Fields§
§root_key_id: String§identifier: String§caveats: Vec<Caveat>§signature: StringImplementations§
Source§impl Macaroon
impl Macaroon
pub fn mint( root_key_id: impl Into<String>, identifier: impl Into<String>, caveats: Vec<Caveat>, root_key: &[u8], ) -> Result<Self>
pub fn verify(&self, root_key: &[u8], context: &VerifyContext) -> Result<()>
pub fn serialize(&self) -> Result<String>
pub fn deserialize(encoded: &str) -> Result<Self>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Macaroon
impl<'de> Deserialize<'de> for Macaroon
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Macaroon
impl StructuralPartialEq for Macaroon
Auto Trait Implementations§
impl Freeze for Macaroon
impl RefUnwindSafe for Macaroon
impl Send for Macaroon
impl Sync for Macaroon
impl Unpin for Macaroon
impl UnsafeUnpin for Macaroon
impl UnwindSafe for Macaroon
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more