pub struct OcppApiClient { /* private fields */ }
Implementations§
Source§impl OcppApiClient
impl OcppApiClient
Sourcepub async fn connect(
url: &str,
) -> Result<Self, Box<dyn Error + Send + Sync + 'static>>
pub async fn connect( url: &str, ) -> Result<Self, Box<dyn Error + Send + Sync + 'static>>
Creates a new instance of the OcppApiClient.
pub async fn create_charger( &self, charger_id: &str, ) -> Result<Option<Charger>, Box<dyn Error + Send + Sync + 'static>>
Sourcepub async fn get_charger(
&self,
charger_id: &str,
) -> Result<Option<Charger>, Box<dyn Error + Send + Sync + 'static>>
pub async fn get_charger( &self, charger_id: &str, ) -> Result<Option<Charger>, Box<dyn Error + Send + Sync + 'static>>
Retrieves a charger by its ID.
pub async fn get_chargers( &self, page_size: i64, page: i64, ) -> Result<Vec<ChargerSummary>, Box<dyn Error + Send + Sync + 'static>>
pub async fn reboot_charger( &self, charger_id: &str, reboot_type: RebootType, ) -> Result<(), Box<dyn Error + Send + Sync + 'static>>
pub async fn change_charger_availability( &self, charger_id: &str, operative: bool, ) -> Result<(), Box<dyn Error + Send + Sync + 'static>>
pub async fn change_evse_availability( &self, charger_id: &str, evse_id: &str, operative: bool, ) -> Result<(), Box<dyn Error + Send + Sync + 'static>>
pub async fn change_connector_availability( &self, charger_id: &str, evse_id: &str, connector_id: &str, operative: bool, ) -> Result<(), Box<dyn Error + Send + Sync + 'static>>
pub async fn clear_charger_cache( &self, charger_id: &str, ) -> Result<(), Box<dyn Error + Send + Sync + 'static>>
pub async fn start_transaction( &self, charger_id: &str, evse_id: &str, ) -> Result<Transaction, Box<dyn Error + Send + Sync + 'static>>
pub async fn stop_transaction( &self, charger_id: &str, transaction_id: &str, ) -> Result<Transaction, Box<dyn Error + Send + Sync + 'static>>
pub async fn get_ongoing_transaction( &self, charger_id: &str, evse_id: Uuid, ) -> Result<Option<Transaction>, Box<dyn Error + Send + Sync + 'static>>
pub async fn create_rfid_scan_session( &self, charger_id: &str, ) -> Result<RfidScanSession, Box<dyn Error + Send + Sync + 'static>>
pub async fn get_rfid_scan_session( &self, session_id: Uuid, ) -> Result<Option<RfidScanSession>, Box<dyn Error + Send + Sync + 'static>>
Trait Implementations§
Source§impl Clone for OcppApiClient
impl Clone for OcppApiClient
Source§fn clone(&self) -> OcppApiClient
fn clone(&self) -> OcppApiClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !Freeze for OcppApiClient
impl !RefUnwindSafe for OcppApiClient
impl Send for OcppApiClient
impl Sync for OcppApiClient
impl Unpin for OcppApiClient
impl !UnwindSafe for OcppApiClient
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request