Struct sn_api::SafeAuthdClient
source · [−]pub struct SafeAuthdClient {
pub authd_endpoint: String,
/* private fields */
}
Fields
authd_endpoint: String
Implementations
sourceimpl SafeAuthdClient
impl SafeAuthdClient
pub fn new(endpoint: Option<String>) -> Self
pub fn version(&self, authd_path: Option<&str>) -> Result<()>
pub fn update(&self, authd_path: Option<&str>) -> Result<()>
pub fn start(&self, authd_path: Option<&str>) -> Result<()>
pub fn stop(&self, authd_path: Option<&str>) -> Result<()>
pub fn restart(&self, authd_path: Option<&str>) -> Result<()>
pub async fn status(&mut self) -> Result<AuthdStatus>
pub async fn unlock(&mut self, passphrase: &str, password: &str) -> Result<()>
pub async fn lock(&mut self) -> Result<()>
pub async fn create(&self, passphrase: &str, password: &str) -> Result<()>
pub async fn authed_apps(&self) -> Result<AuthedAppsList>
pub async fn revoke_app(&self, app_id: &str) -> Result<()>
pub async fn auth_reqs(&self) -> Result<PendingAuthReqs>
pub async fn allow(&self, req_id: SafeAuthReqId) -> Result<()>
pub async fn deny(&self, req_id: SafeAuthReqId) -> Result<()>
pub async fn subscribe<CB: 'static + Fn(AuthReq) -> Option<bool> + Send + Sync>(
&mut self,
endpoint_url: &str,
_app_id: &str,
allow_cb: CB
) -> Result<()>
pub async fn subscribe_url(&self, endpoint_url: &str) -> Result<()>
pub async fn unsubscribe(&mut self, endpoint_url: &str) -> Result<()>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SafeAuthdClient
impl Send for SafeAuthdClient
impl Sync for SafeAuthdClient
impl Unpin for SafeAuthdClient
impl UnwindSafe for SafeAuthdClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more