Struct ProfileConfig
pub struct ProfileConfig {
pub base: NetworkType,
pub network_domain: Option<String>,
pub sequencer: Option<String>,
pub sequencer_rpc: Option<String>,
}Expand description
Structured config for selecting a built-in profile and overriding selected fields.
Fields§
§base: NetworkTypeBase built-in profile to inherit values from.
network_domain: Option<String>Optional network domain override. The config value is validated as-is: ASCII-only, lowercase only, no leading/trailing whitespace, and no leading/trailing dots.
sequencer: Option<String>Optional WebSocket endpoint override for the sequencer.
sequencer_rpc: Option<String>Optional HTTP JSON-RPC endpoint override for Lyquid instance sequencer reads.
Implementations§
§impl ProfileConfig
impl ProfileConfig
pub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validate configured profile overrides without resolving the sequencer endpoint.
pub fn resolved_network_domain(&self) -> Result<String>
pub fn resolved_network_domain(&self) -> Result<String>
Return the configured network domain, or the built-in domain for the base profile.
pub fn resolve(&self, sequencer: String) -> Result<LyquorProfile>
pub fn resolve(&self, sequencer: String) -> Result<LyquorProfile>
Resolve this profile config into a concrete profile for a sequencer endpoint.
Trait Implementations§
§impl Clone for ProfileConfig
impl Clone for ProfileConfig
§fn clone(&self) -> ProfileConfig
fn clone(&self) -> ProfileConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ProfileConfig
impl Debug for ProfileConfig
§impl Default for ProfileConfig
impl Default for ProfileConfig
§impl<'de> Deserialize<'de> for ProfileConfig
impl<'de> Deserialize<'de> for ProfileConfig
§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq for ProfileConfig
impl PartialEq for ProfileConfig
§impl Serialize for ProfileConfig
impl Serialize for ProfileConfig
impl Eq for ProfileConfig
impl StructuralPartialEq for ProfileConfig
Auto Trait Implementations§
impl Freeze for ProfileConfig
impl RefUnwindSafe for ProfileConfig
impl Send for ProfileConfig
impl Sync for ProfileConfig
impl Unpin for ProfileConfig
impl UnsafeUnpin for ProfileConfig
impl UnwindSafe for ProfileConfig
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.