pub struct RouterAvailability {
pub limit_order: bool,
pub v2: bool,
pub v3: bool,
}Expand description
Represents which routers are available on a specific chain
This provides a type-safe way to query router availability without needing to call multiple trait methods.
Fields§
§limit_order: boolWhether the Limit Order V2 router is available
v2: boolWhether the V2 router is available
v3: boolWhether the V3 router is available
Implementations§
Source§impl RouterAvailability
impl RouterAvailability
Sourcepub const fn lo_v3_only() -> Self
pub const fn lo_v3_only() -> Self
Creates availability for LO + V3 only
Sourcepub const fn v2_v3_only() -> Self
pub const fn v2_v3_only() -> Self
Creates availability for V2 + V3 only (most chains)
Sourcepub const fn has(&self, router_type: RouterType) -> bool
pub const fn has(&self, router_type: RouterType) -> bool
Checks if the specified router type is available
Sourcepub fn available_routers(&self) -> Vec<RouterType>
pub fn available_routers(&self) -> Vec<RouterType>
Returns all available router types
Trait Implementations§
Source§impl Clone for RouterAvailability
impl Clone for RouterAvailability
Source§fn clone(&self) -> RouterAvailability
fn clone(&self) -> RouterAvailability
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 RouterAvailability
impl Debug for RouterAvailability
Source§impl Display for RouterAvailability
impl Display for RouterAvailability
Source§impl PartialEq for RouterAvailability
impl PartialEq for RouterAvailability
impl Copy for RouterAvailability
impl Eq for RouterAvailability
impl StructuralPartialEq for RouterAvailability
Auto Trait Implementations§
impl Freeze for RouterAvailability
impl RefUnwindSafe for RouterAvailability
impl Send for RouterAvailability
impl Sync for RouterAvailability
impl Unpin for RouterAvailability
impl UnwindSafe for RouterAvailability
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> 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> 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.