pub struct AccountingTask<C> { /* private fields */ }Expand description
An ongoing task whose status is tracked via TACACS+ accounting.
Implementations§
Source§impl<'a, S: AsyncRead + AsyncWrite + Unpin> AccountingTask<&'a Client<S>>
impl<'a, S: AsyncRead + AsyncWrite + Unpin> AccountingTask<&'a Client<S>>
Sourcepub async fn update<'args, A: AsRef<[Argument<'args>]>>(
&self,
arguments: A,
) -> Result<AccountingResponse, ClientError>
pub async fn update<'args, A: AsRef<[Argument<'args>]>>( &self, arguments: A, ) -> Result<AccountingResponse, ClientError>
Sends an update to the TACACS+ server about this task with the provided arguments.
The task_id and elapsed_time arguments from RFC8907 section 8.3 are added internally.
Sourcepub async fn stop<'args, A: AsRef<[Argument<'args>]>>(
self,
arguments: A,
) -> Result<AccountingResponse, ClientError>
pub async fn stop<'args, A: AsRef<[Argument<'args>]>>( self, arguments: A, ) -> Result<AccountingResponse, ClientError>
Signals to the TACACS+ server that this task has completed.
Since this should only be done once, this consumes the task.
The stop_time and task_id arguments from RFC8907 section 8.3 are also added internally.
Auto Trait Implementations§
impl<C> Freeze for AccountingTask<C>where
C: Freeze,
impl<C> RefUnwindSafe for AccountingTask<C>where
C: RefUnwindSafe,
impl<C> Send for AccountingTask<C>where
C: Send,
impl<C> Sync for AccountingTask<C>where
C: Sync,
impl<C> Unpin for AccountingTask<C>where
C: Unpin,
impl<C> UnwindSafe for AccountingTask<C>where
C: UnwindSafe,
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