pub struct EndpointInfo {
pub base: String,
pub token: Option<String>,
pub is_quicknode: bool,
}Expand description
Parsed endpoint information
Fields§
§base: StringBase URL (scheme + host)
token: Option<String>Token extracted from URL path (if any)
is_quicknode: boolWhether this is a QuickNode endpoint
Implementations§
Source§impl EndpointInfo
impl EndpointInfo
Sourcepub fn parse(url: &str) -> Self
pub fn parse(url: &str) -> Self
Parse endpoint URL and extract token
Handles URLs like:
https://x.quiknode.pro/TOKEN/evm-> base=https://x.quiknode.pro, token=TOKENhttps://x.quiknode.pro/TOKEN-> base=https://x.quiknode.pro, token=TOKENhttps://api.hyperliquid.xyz/info-> base=https://api.hyperliquid.xyz, token=None
Sourcepub fn build_url(&self, suffix: &str) -> String
pub fn build_url(&self, suffix: &str) -> String
Build URL for a specific path suffix (e.g., “info”, “hypercore”, “evm”)
Sourcepub fn build_ws_url(&self) -> String
pub fn build_ws_url(&self) -> String
Build WebSocket URL
Sourcepub fn build_grpc_url(&self) -> String
pub fn build_grpc_url(&self) -> String
Build gRPC URL (uses port 10000)
Trait Implementations§
Source§impl Clone for EndpointInfo
impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
fn clone(&self) -> EndpointInfo
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 EndpointInfo
impl RefUnwindSafe for EndpointInfo
impl Send for EndpointInfo
impl Sync for EndpointInfo
impl Unpin for EndpointInfo
impl UnsafeUnpin for EndpointInfo
impl UnwindSafe for EndpointInfo
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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