pub struct Client { /* private fields */ }
Expand description
An IP restriction is a restriction placed on the CIDRs that are allowed to initiate traffic to a specific aspect of your ngrok account. An IP restriction has a type which defines the ingress it applies to. IP restrictions can be used to enforce the source IPs that can make API requests, log in to the dashboard, start ngrok agents, and connect to your public-facing endpoints.
Implementations§
Source§impl Client
impl Client
pub fn new(c: Client) -> Self
Sourcepub async fn create(
&self,
req: &IPRestrictionCreate,
) -> Result<IPRestriction, Error>
pub async fn create( &self, req: &IPRestrictionCreate, ) -> Result<IPRestriction, Error>
Create a new IP restriction
Sourcepub async fn get(&self, id: &str) -> Result<IPRestriction, Error>
pub async fn get(&self, id: &str) -> Result<IPRestriction, Error>
Get detailed information about an IP restriction
Sourcepub async fn update(
&self,
req: &IPRestrictionUpdate,
) -> Result<IPRestriction, Error>
pub async fn update( &self, req: &IPRestrictionUpdate, ) -> Result<IPRestriction, Error>
Update attributes of an IP restriction 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