pub struct Client { /* private fields */ }
Implementations§
Source§impl Client
impl Client
pub async fn new( http_client: HttpClient, reg: Registration, node_address: SocketAddr, attributes: HashMap<String, String>, ) -> Result<Self>
pub async fn register( http_client: &HttpClient, control_url: Url, node_name: Uuid, csr_pem: String, ) -> Result<Registration>
pub fn reg(&self) -> Registration
pub fn node_id(&self) -> u64
pub fn next_message_id(&self) -> u64
pub fn next_query_id(&self) -> u64
pub async fn get<T: DeserializeOwned>( &self, url: &str, query: Option<&str>, ) -> Result<T>
pub async fn post<T: Serialize, R: DeserializeOwned>( &self, url: &str, data: T, ) -> Result<R>
pub async fn upload<R: DeserializeOwned>( &self, url: &str, body: Vec<u8>, ) -> Result<R>
pub async fn refresh_nodes(&self) -> Result<()>
pub async fn notify_node_stopped(&self) -> Result<()>
pub fn node_info(&self, node_id: u64) -> Option<NodeInfo>
pub fn node_ids(&self) -> Vec<u64>
pub async fn lookup_nodes(&self, query: &str) -> Result<(u64, usize)>
pub fn query_result(&self, query_id: &u64) -> Option<(u64, Vec<u64>)>
pub fn node_count(&self) -> usize
pub async fn get_module( &self, module_id: u64, environment_id: u64, ) -> Result<Vec<u8>>
pub async fn add_module(&self, module: Vec<u8>) -> Result<RawWasm>
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self
file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self
file descriptor. Read moreSource§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