pub struct Limit<'a> { /* private fields */ }Expand description
Used to limit which operations will be allowed by the CapNetAgent.
Implementations§
Source§impl<'a> Limit<'a>
impl<'a> Limit<'a>
Sourcepub fn bind(&mut self, sa: &dyn SockaddrLike) -> &mut Self
pub fn bind(&mut self, sa: &dyn SockaddrLike) -> &mut Self
Limit the cap_net service to only allow binding to the given address.
May be called multiple times to allow binding to multiple addresses.
Sourcepub fn connect(&mut self, sa: &dyn SockaddrLike) -> &mut Self
pub fn connect(&mut self, sa: &dyn SockaddrLike) -> &mut Self
Limit the cap_net service to only allow connecting to the given
address.
May be called multiple times to allow connecting to multiple addresses.
Auto Trait Implementations§
impl<'a> Freeze for Limit<'a>
impl<'a> RefUnwindSafe for Limit<'a>
impl<'a> !Send for Limit<'a>
impl<'a> !Sync for Limit<'a>
impl<'a> Unpin for Limit<'a>
impl<'a> !UnwindSafe for Limit<'a>
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