pub struct LightspeedConfig {
pub api_key: String,
pub svs_rpc_url: String,
pub default_priority: Priority,
pub timeout: Duration,
pub keep_alive_interval: Duration,
pub use_https: bool,
pub debug: bool,
pub custom_endpoint: Option<String>,
pub balance_check_rpc_url: String,
pub check_balance_before_send: bool,
}Expand description
Configuration settings for the Lightspeed client
Contains all configurable parameters for connecting to and interacting with the Lightspeed service.
Fields§
§api_key: StringAPI key for authentication
Obtain your API key from the Solana Vibe Station cloud portal.
svs_rpc_url: StringSVS RPC URL
Your Solana Vibe Station RPC endpoint URL Example: “https://basic.rpc.solanavibestation.com”
default_priority: PriorityDefault priority level for transactions
Used when sending transactions without explicitly specifying priority.
timeout: DurationHTTP request timeout duration
keep_alive_interval: DurationInterval between keep-alive requests
Only applies when automatic keep-alive is enabled via start_keep_alive().
use_https: boolUse HTTPS for secure connections
Recommended for production environments.
debug: boolEnable debug logging
When enabled, additional diagnostic information will be logged.
custom_endpoint: Option<String>Custom endpoint URL (optional)
Primarily used for testing or connecting to alternative endpoints.
balance_check_rpc_url: StringSolana RPC URL for balance checks
Used when check_balance_before_send is enabled to verify sufficient
balance before sending transactions. Defaults to the public SVS endpoint.
check_balance_before_send: boolCheck balance before sending transactions
When enabled, prevents wasting transaction fees on transactions that will fail due to insufficient balance.
Implementations§
Source§impl LightspeedConfig
impl LightspeedConfig
Sourcepub fn get_endpoint(&self) -> Result<Url, LightspeedError>
pub fn get_endpoint(&self) -> Result<Url, LightspeedError>
Process the configuration and return the final endpoint URL
If a custom endpoint is set, it uses that directly. Otherwise, it processes the SVS RPC URL into the Lightspeed format.
Trait Implementations§
Source§impl Clone for LightspeedConfig
impl Clone for LightspeedConfig
Source§fn clone(&self) -> LightspeedConfig
fn clone(&self) -> LightspeedConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LightspeedConfig
impl Debug for LightspeedConfig
Auto Trait Implementations§
impl Freeze for LightspeedConfig
impl RefUnwindSafe for LightspeedConfig
impl Send for LightspeedConfig
impl Sync for LightspeedConfig
impl Unpin for LightspeedConfig
impl UnwindSafe for LightspeedConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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>
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>
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 more