pub struct General<'a> {
pub client: Client<'a>,
}Fields§
§client: Client<'a>Implementations§
source§impl<'a> General<'_>
impl<'a> General<'_>
The General struct represents general functionality for the Bybit API.
sourcepub async fn ping(&self) -> Result<String, BybitError>
pub async fn ping(&self) -> Result<String, BybitError>
Tests for connectivity by sending a ping request to the Bybit server.
§Returns
Returns a Result containing a String with the response message if successful,
or a BybitError if an error occurs.
sourcepub async fn get_server_time(&self) -> Result<ServerTimeResponse, BybitError>
pub async fn get_server_time(&self) -> Result<ServerTimeResponse, BybitError>
Retrieves the server time from the Bybit API.
§Returns
Returns a Result containing a ServerTime struct if successful,
or a BybitError if an error occurs.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for General<'a>
impl<'a> !RefUnwindSafe for General<'a>
impl<'a> Send for General<'a>
impl<'a> Sync for General<'a>
impl<'a> Unpin for General<'a>
impl<'a> !UnwindSafe for General<'a>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)