pub enum EndpointType {
Public,
Private,
}Expand description
Endpoint type enum for distinguishing between public and private API endpoints.
This enum is used by exchange-specific endpoint router traits to determine which API endpoint to use for a given request.
§Examples
use ccxt_core::types::EndpointType;
let public_endpoint = EndpointType::Public;
let private_endpoint = EndpointType::Private;
assert_ne!(public_endpoint, private_endpoint);Variants§
Public
Public API endpoint (no authentication required)
Used for accessing publicly available data such as:
- Market information
- Ticker data
- Order book data
- Recent trades
Private
Private API endpoint (authentication required)
Used for accessing user-specific data and operations such as:
- Account balances
- Order management
- Trade history
- Withdrawals
Implementations§
Source§impl EndpointType
impl EndpointType
Sourcepub const fn is_public(&self) -> bool
pub const fn is_public(&self) -> bool
Returns true if this is a public endpoint.
§Examples
use ccxt_core::types::EndpointType;
assert!(EndpointType::Public.is_public());
assert!(!EndpointType::Private.is_public());Sourcepub const fn is_private(&self) -> bool
pub const fn is_private(&self) -> bool
Returns true if this is a private endpoint.
§Examples
use ccxt_core::types::EndpointType;
assert!(EndpointType::Private.is_private());
assert!(!EndpointType::Public.is_private());Trait Implementations§
Source§impl Clone for EndpointType
impl Clone for EndpointType
Source§fn clone(&self) -> EndpointType
fn clone(&self) -> EndpointType
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 moreSource§impl Debug for EndpointType
impl Debug for EndpointType
Source§impl Default for EndpointType
impl Default for EndpointType
Source§fn default() -> EndpointType
fn default() -> EndpointType
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EndpointType
impl<'de> Deserialize<'de> for EndpointType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EndpointType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EndpointType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for EndpointType
impl Display for EndpointType
Source§impl Hash for EndpointType
impl Hash for EndpointType
Source§impl PartialEq for EndpointType
impl PartialEq for EndpointType
Source§impl Serialize for EndpointType
impl Serialize for EndpointType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for EndpointType
impl Eq for EndpointType
impl StructuralPartialEq for EndpointType
Auto Trait Implementations§
impl Freeze for EndpointType
impl RefUnwindSafe for EndpointType
impl Send for EndpointType
impl Sync for EndpointType
impl Unpin for EndpointType
impl UnwindSafe for EndpointType
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.