Trait tor_circmgr::mgr::AbstractCirc

source ·
pub(crate) trait AbstractCirc: Debug {
    type Id: Clone + Debug + Hash + Eq + Send + Sync;

    // Required methods
    fn id(&self) -> Self::Id;
    fn usable(&self) -> bool;
}
Expand description

Minimal abstract view of a circuit.

From this module’s point of view, circuits are simply objects with unique identities, and a possible closed-state.

Required Associated Types§

source

type Id: Clone + Debug + Hash + Eq + Send + Sync

Type for a unique identifier for circuits.

Required Methods§

source

fn id(&self) -> Self::Id

Return the unique identifier for this circuit.

§Requirements

The values returned by this function are unique for distinct circuits.

source

fn usable(&self) -> bool

Return true if this circuit is usable for some purpose.

Reasons a circuit might be unusable include being closed.

Implementations on Foreign Types§

source§

impl AbstractCirc for ClientCirc

§

type Id = UniqId

source§

fn id(&self) -> Self::Id

source§

fn usable(&self) -> bool

Implementors§