pub enum Request {
Put {
token: String,
repo: String,
passphrase: String,
},
Get {
token: String,
repo: String,
},
Drop {
token: String,
repo: Option<String>,
},
Status {
token: String,
},
Shutdown {
token: String,
},
}Expand description
What a client sends. Every variant carries the token: there is no
unauthenticated operation, not even Status, because whether an agent holds
a passphrase for a given repository is itself worth not answering.
Variants§
Put
Store a passphrase for repo.
Get
Retrieve the passphrase for repo, if one is held and unexpired.
Drop
Forget one repository’s passphrase, or all of them when repo is None.
Status
How many entries are held, and with what idle timeout.
Shutdown
Stop the agent, clearing everything it holds.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
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
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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