pub struct Client { /* private fields */ }
Expand description
Tunnel Credentials are ngrok agent authtokens. They authorize the ngrok
agent to connect the ngrok service as your account. They are installed with
the ngrok config add-authtoken
command or by specifying it in the ngrok.yml
configuration file with the authtoken
property.
Implementations§
Source§impl Client
impl Client
pub fn new(c: Client) -> Self
Sourcepub async fn create(&self, req: &CredentialCreate) -> Result<Credential, Error>
pub async fn create(&self, req: &CredentialCreate) -> Result<Credential, Error>
Create a new tunnel authtoken credential. This authtoken credential can be used to start a new tunnel session. The response to this API call is the only time the generated token is available. If you need it for future use, you must save it securely yourself.
Sourcepub async fn delete(&self, id: &str) -> Result<(), Error>
pub async fn delete(&self, id: &str) -> Result<(), Error>
Delete a tunnel authtoken credential by ID
Sourcepub async fn get(&self, id: &str) -> Result<Credential, Error>
pub async fn get(&self, id: &str) -> Result<Credential, Error>
Get detailed information about a tunnel authtoken credential
Sourcepub async fn update(&self, req: &CredentialUpdate) -> Result<Credential, Error>
pub async fn update(&self, req: &CredentialUpdate) -> Result<Credential, Error>
Update attributes of an tunnel authtoken credential by ID
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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