pub struct DstackClient { /* private fields */ }Expand description
The main client for interacting with the dstack service
Implementations§
Source§impl DstackClient
impl DstackClient
pub fn new(endpoint: Option<&str>) -> Self
pub async fn get_key( &self, path: Option<String>, purpose: Option<String>, ) -> Result<GetKeyResponse>
pub async fn get_quote(&self, report_data: Vec<u8>) -> Result<GetQuoteResponse>
pub async fn info(&self) -> Result<InfoResponse>
pub async fn emit_event(&self, event: String, payload: Vec<u8>) -> Result<()>
pub async fn get_tls_key( &self, tls_key_config: TlsKeyConfig, ) -> Result<GetTlsKeyResponse>
Trait Implementations§
impl BaseClient for DstackClient
Auto Trait Implementations§
impl Freeze for DstackClient
impl RefUnwindSafe for DstackClient
impl Send for DstackClient
impl Sync for DstackClient
impl Unpin for DstackClient
impl UnwindSafe for DstackClient
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