pub enum Identity {
User {
subgraph_id: u64,
user_id: u64,
key: String,
expiration: u64,
origins: String,
signature: String,
},
ApiKey {
subgraph_id: u64,
key: String,
expiration: u64,
origins: String,
signature: String,
},
}Variants§
Implementations§
Source§impl Identity
impl Identity
pub fn from_ssk(ssk: &str) -> Result<Identity>
pub fn to_ssk(&self) -> Result<String>
pub fn stringify_as_ssk(&self) -> Result<(String, &str)>
pub fn sign(&mut self, secret: &str) -> Result<()>
pub fn sign_with(&mut self, signer: &Signer) -> Result<()>
pub fn verify(&self) -> Result<()>
pub fn origin(&self) -> &str
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Identity
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnwindSafe for Identity
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