pub struct CliTheaterClient { /* private fields */ }Expand description
CLI wrapper around theater-client with timeout and retry logic
Implementations§
Source§impl CliTheaterClient
impl CliTheaterClient
Sourcepub fn new(address: SocketAddr, config: Config) -> Self
pub fn new(address: SocketAddr, config: Config) -> Self
Create a new CLI client
Sourcepub async fn send_command(
&mut self,
command: ManagementCommand,
) -> CliResult<ManagementResponse>
pub async fn send_command( &mut self, command: ManagementCommand, ) -> CliResult<ManagementResponse>
Send a command and receive a response with CLI timeout and error handling
Sourcepub async fn send_command_no_response(
&mut self,
command: ManagementCommand,
) -> CliResult<()>
pub async fn send_command_no_response( &mut self, command: ManagementCommand, ) -> CliResult<()>
Send a command without waiting for response (fire and forget)
Sourcepub async fn receive(&mut self) -> CliResult<ManagementResponse>
pub async fn receive(&mut self) -> CliResult<ManagementResponse>
Receive the next response (for streaming operations)
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Check if connected
Sourcepub fn address(&self) -> SocketAddr
pub fn address(&self) -> SocketAddr
Get the server address
Auto Trait Implementations§
impl !Freeze for CliTheaterClient
impl RefUnwindSafe for CliTheaterClient
impl Send for CliTheaterClient
impl Sync for CliTheaterClient
impl Unpin for CliTheaterClient
impl UnwindSafe for CliTheaterClient
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more