Struct ArduinoCoreClient

Source
pub struct ArduinoCoreClient<T> { /* private fields */ }
Expand description

The main Arduino Platform Service

Implementations§

Source§

impl ArduinoCoreClient<Channel>

Source

pub async fn connect<D>(dst: D) -> Result<Self, Error>
where D: TryInto<Endpoint>, D::Error: Into<StdError>,

Attempt to create a new client by connecting to a given endpoint.

Source§

impl<T> ArduinoCoreClient<T>
where T: GrpcService<BoxBody>, T::ResponseBody: Body + HttpBody + Send + 'static, T::Error: Into<StdError>, <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,

Source

pub fn new(inner: T) -> Self

Source

pub fn with_interceptor(inner: T, interceptor: impl Into<Interceptor>) -> Self

Source

pub async fn init( &mut self, request: impl IntoRequest<InitReq>, ) -> Result<Response<Streaming<InitResp>>, Status>

Start a new instance of the Arduino Core Service

Source

pub async fn destroy( &mut self, request: impl IntoRequest<DestroyReq>, ) -> Result<Response<DestroyResp>, Status>

Destroy an instance of the Arduino Core Service

Source

pub async fn rescan( &mut self, request: impl IntoRequest<RescanReq>, ) -> Result<Response<RescanResp>, Status>

Rescan instance of the Arduino Core Service

Source

pub async fn update_index( &mut self, request: impl IntoRequest<UpdateIndexReq>, ) -> Result<Response<Streaming<UpdateIndexResp>>, Status>

Update package index of the Arduino Core Service

Source

pub async fn update_libraries_index( &mut self, request: impl IntoRequest<UpdateLibrariesIndexReq>, ) -> Result<Response<Streaming<UpdateLibrariesIndexResp>>, Status>

Update libraries index

Source

pub async fn update_core_libraries_index( &mut self, request: impl IntoRequest<UpdateCoreLibrariesIndexReq>, ) -> Result<Response<Streaming<UpdateCoreLibrariesIndexResp>>, Status>

Update packages indexes for both Cores and Libraries

Source

pub async fn outdated( &mut self, request: impl IntoRequest<OutdatedReq>, ) -> Result<Response<OutdatedResp>, Status>

Outdated returns a message with a list of outdated Cores and Libraries

Source

pub async fn upgrade( &mut self, request: impl IntoRequest<UpgradeReq>, ) -> Result<Response<Streaming<UpgradeResp>>, Status>

Upgrade both Cores and Libraries

Source

pub async fn version( &mut self, request: impl IntoRequest<VersionReq>, ) -> Result<Response<VersionResp>, Status>

Get the version of Arduino CLI in use.

Source

pub async fn load_sketch( &mut self, request: impl IntoRequest<LoadSketchReq>, ) -> Result<Response<LoadSketchResp>, Status>

Returns all files composing a Sketch

Source

pub async fn archive_sketch( &mut self, request: impl IntoRequest<ArchiveSketchReq>, ) -> Result<Response<ArchiveSketchResp>, Status>

Creates a zip file containing all files of specified Sketch

Source

pub async fn board_details( &mut self, request: impl IntoRequest<BoardDetailsReq>, ) -> Result<Response<BoardDetailsResp>, Status>

Requests details about a board

Source

pub async fn board_attach( &mut self, request: impl IntoRequest<BoardAttachReq>, ) -> Result<Response<Streaming<BoardAttachResp>>, Status>

Attach a board to a sketch. When the fqbn field of a request is not provided, the FQBN of the attached board will be used.

Source

pub async fn board_list( &mut self, request: impl IntoRequest<BoardListReq>, ) -> Result<Response<BoardListResp>, Status>

List the boards currently connected to the computer.

Source

pub async fn board_list_all( &mut self, request: impl IntoRequest<BoardListAllReq>, ) -> Result<Response<BoardListAllResp>, Status>

List all the boards provided by installed platforms.

Source

pub async fn board_list_watch( &mut self, request: impl IntoStreamingRequest<Message = BoardListWatchReq>, ) -> Result<Response<Streaming<BoardListWatchResp>>, Status>

List boards connection and disconnected events.

Source

pub async fn compile( &mut self, request: impl IntoRequest<CompileReq>, ) -> Result<Response<Streaming<CompileResp>>, Status>

Compile an Arduino sketch.

Source

pub async fn platform_install( &mut self, request: impl IntoRequest<PlatformInstallReq>, ) -> Result<Response<Streaming<PlatformInstallResp>>, Status>

Download and install a platform and its tool dependencies.

Source

pub async fn platform_download( &mut self, request: impl IntoRequest<PlatformDownloadReq>, ) -> Result<Response<Streaming<PlatformDownloadResp>>, Status>

Download a platform and its tool dependencies to the staging/packages subdirectory of the data directory.

Source

pub async fn platform_uninstall( &mut self, request: impl IntoRequest<PlatformUninstallReq>, ) -> Result<Response<Streaming<PlatformUninstallResp>>, Status>

Uninstall a platform as well as its tool dependencies that are not used by other installed platforms.

Source

pub async fn platform_upgrade( &mut self, request: impl IntoRequest<PlatformUpgradeReq>, ) -> Result<Response<Streaming<PlatformUpgradeResp>>, Status>

Upgrade an installed platform to the latest version.

Source

pub async fn upload( &mut self, request: impl IntoRequest<UploadReq>, ) -> Result<Response<Streaming<UploadResp>>, Status>

Upload a compiled sketch to a board.

Source

pub async fn upload_using_programmer( &mut self, request: impl IntoRequest<UploadUsingProgrammerReq>, ) -> Result<Response<Streaming<UploadUsingProgrammerResp>>, Status>

Upload a compiled sketch to a board using a programmer.

Source

pub async fn list_programmers_available_for_upload( &mut self, request: impl IntoRequest<ListProgrammersAvailableForUploadReq>, ) -> Result<Response<ListProgrammersAvailableForUploadResp>, Status>

List programmers available for a board.

Source

pub async fn burn_bootloader( &mut self, request: impl IntoRequest<BurnBootloaderReq>, ) -> Result<Response<Streaming<BurnBootloaderResp>>, Status>

Burn bootloader to a board.

Search for a platform in the platforms indexes.

Source

pub async fn platform_list( &mut self, request: impl IntoRequest<PlatformListReq>, ) -> Result<Response<PlatformListResp>, Status>

List all installed platforms.

Source

pub async fn library_download( &mut self, request: impl IntoRequest<LibraryDownloadReq>, ) -> Result<Response<Streaming<LibraryDownloadResp>>, Status>

Download the archive file of an Arduino library in the libraries index to the staging directory.

Source

pub async fn library_install( &mut self, request: impl IntoRequest<LibraryInstallReq>, ) -> Result<Response<Streaming<LibraryInstallResp>>, Status>

Download and install an Arduino library from the libraries index.

Source

pub async fn zip_library_install( &mut self, request: impl IntoRequest<ZipLibraryInstallReq>, ) -> Result<Response<Streaming<ZipLibraryInstallResp>>, Status>

Install a library from a Zip File

Source

pub async fn git_library_install( &mut self, request: impl IntoRequest<GitLibraryInstallReq>, ) -> Result<Response<Streaming<GitLibraryInstallResp>>, Status>

Download and install a library from a git url

Source

pub async fn library_uninstall( &mut self, request: impl IntoRequest<LibraryUninstallReq>, ) -> Result<Response<Streaming<LibraryUninstallResp>>, Status>

Uninstall an Arduino library.

Source

pub async fn library_upgrade_all( &mut self, request: impl IntoRequest<LibraryUpgradeAllReq>, ) -> Result<Response<Streaming<LibraryUpgradeAllResp>>, Status>

Upgrade all installed Arduino libraries to the newest version available.

Source

pub async fn library_resolve_dependencies( &mut self, request: impl IntoRequest<LibraryResolveDependenciesReq>, ) -> Result<Response<LibraryResolveDependenciesResp>, Status>

List the recursive dependencies of a library, as defined by the depends field of the library.properties files.

Search the Arduino libraries index for libraries.

Source

pub async fn library_list( &mut self, request: impl IntoRequest<LibraryListReq>, ) -> Result<Response<LibraryListResp>, Status>

List the installed libraries.

Trait Implementations§

Source§

impl<T: Clone> Clone for ArduinoCoreClient<T>

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for ArduinoCoreClient<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> Freeze for ArduinoCoreClient<T>
where T: Freeze,

§

impl<T> !RefUnwindSafe for ArduinoCoreClient<T>

§

impl<T> Send for ArduinoCoreClient<T>
where T: Send,

§

impl<T> Sync for ArduinoCoreClient<T>
where T: Sync,

§

impl<T> Unpin for ArduinoCoreClient<T>
where T: Unpin,

§

impl<T> !UnwindSafe for ArduinoCoreClient<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more