pub struct OkxExecutor { /* private fields */ }Implementations§
Source§impl OkxExecutor
impl OkxExecutor
Sourcepub fn builder() -> OkxExecutorBuilder<((), (), (), (), ())>
pub fn builder() -> OkxExecutorBuilder<((), (), (), (), ())>
Create a builder for building OkxExecutor.
On the builder, call .endpoint(...), .rest_client(...)(optional), .signer(...)(optional), .ratelimiter(...)(optional), .streams(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of OkxExecutor.
Source§impl OkxExecutor
impl OkxExecutor
pub fn get_endpoint(&self) -> &OkxEndpoint
pub async fn subscribe_stream<T: DeserializeOwned + Send + 'static>( &self, url: &str, arg: Value, ) -> Result<Receiver<Result<T, SharedWsError>>, SharedWsError>
Trait Implementations§
fn get_client(&self) -> &Client
fn get_signer(&self) -> &dyn SharedSignerTrait
fn get_ratelimiter( &self, ) -> Arc<dyn SharedRatelimiterTrait<OkxRateLimitKey> + Sync + Send> ⓘ
fn call_with_no_payload<'life0, 'life1, 'async_trait, ResponseType, Err>(
&'life0 self,
limits: &'life1 [(RateLimitType, NonZero<u32>)],
signed: bool,
method: Method,
url: Url,
) -> Pin<Box<dyn Future<Output = Result<ResponseType, SharedRestError<Err>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ResponseType: 'async_trait + SharedRestResponseTrait,
Err: 'async_trait + SharedRestClientErrorTrait,
Self: Sync + 'async_trait,
fn call_with_no_response<'life0, 'life1, 'life2, 'async_trait, PayloadType, Err>(
&'life0 self,
limits: &'life1 [(RateLimitType, NonZero<u32>)],
signed: bool,
method: Method,
url: Url,
payload: Option<&'life2 PayloadType>,
) -> Pin<Box<dyn Future<Output = Result<(), SharedRestError<Err>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PayloadType: 'async_trait + Sync + Send + SharedRestPayloadTrait,
Err: 'async_trait + SharedRestClientErrorTrait,
Self: Sync + 'async_trait,
fn call_with_no_payload_and_response<'life0, 'life1, 'async_trait, Err>(
&'life0 self,
limits: &'life1 [(RateLimitType, NonZero<u32>)],
signed: bool,
method: Method,
url: Url,
) -> Pin<Box<dyn Future<Output = Result<(), SharedRestError<Err>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Err: 'async_trait + SharedRestClientErrorTrait,
Self: Sync + 'async_trait,
fn call<'life0, 'life1, 'life2, 'async_trait, PayloadType, ResponseType, Err>(
&'life0 self,
limits: &'life1 [(RateLimitType, NonZero<u32>)],
signed: bool,
method: Method,
url: Url,
payload: Option<&'life2 PayloadType>,
) -> Pin<Box<dyn Future<Output = Result<ResponseType, SharedRestError<Err>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PayloadType: 'async_trait + Sync + Send + SharedRestPayloadTrait,
ResponseType: 'async_trait + SharedRestResponseTrait,
Err: 'async_trait + SharedRestClientErrorTrait,
Self: Sync + 'async_trait,
Auto Trait Implementations§
impl !Freeze for OkxExecutor
impl !RefUnwindSafe for OkxExecutor
impl !UnwindSafe for OkxExecutor
impl Send for OkxExecutor
impl Sync for OkxExecutor
impl Unpin for OkxExecutor
impl UnsafeUnpin for OkxExecutor
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