Expand description
Define different restrictions that can be applied to relays.
Re-exportsΒ§
use tor_geoip::HasCountryCode;πuse tor_linkspec::ChanTarget;πuse tor_linkspec::HasAddrs;πuse tor_linkspec::HasRelayIds;πuse tor_linkspec::RelayIdSet;πuse tor_netdir::FamilyRules;πuse tor_netdir::NetDir;πuse tor_netdir::Relay;πuse tor_netdir::SubnetConfig;πuse tor_netdoc::types::policy::AddrPortPattern;πuse crate::LowLevelRelayPredicate;πuse crate::RelaySelectionConfig;πuse crate::RelayUsage;πuse std::fmt;πuse std::net::IpAddr;π
StructsΒ§
- Relay
Exclusion - A set of relays that we must not use when picking a given relays.
- Relay
List π - Helper: wraps
Vec[Relay], but implements Debug. - Relay
Restriction - A restriction that we use when picking relays.
EnumsΒ§
- Restriction
Inner π - Enumeration of possible
RelayRestrictions.
FunctionsΒ§
- relay_
has_ πaddr_ in_ set - Return true if
relayhas at least one address matching at least one member ofpatterns. - relays_
in_ πsame_ extended_ family - Return true if
r1andr2are in the same βextendedβ family, considering both explicitly declared families and subnet-based extended families.