Skip to main content

Module select

Module select 

Source
Expand description

Logic for filtering and selecting channels in order to find suitable channels for a target.

Re-exportsΒ§

use crate::mgr::AbstractChannel; πŸ”’
use crate::mgr::state::ChannelState; πŸ”’
use crate::mgr::state::OpenEntry; πŸ”’
use crate::mgr::state::PendingEntry; πŸ”’
use tor_linkspec::HasChanMethod; πŸ”’
use tor_linkspec::HasRelayIds; πŸ”’
use tor_linkspec::RelayIds; πŸ”’

EnumsΒ§

Choice πŸ”’
Similar to Ordering, but is easier to reason about when comparing two objects that don’t have a numeric sense of ordering (ex: returning Greater is confusing if the ordering isn’t numeric).

FunctionsΒ§

choose_best_channel πŸ”’
Returns the best channel for target.
open_channel_is_allowed πŸ”’
Returns true if the open channel is allowed to be used for a new channel request to the target.
pending_channel_maybe_allowed πŸ”’
Returns true if the pending channel could possibly be used for a new channel request to the target. You still need to verify the final built channel with open_channel_is_allowed before using it.