Skip to main content

PathManager

Trait PathManager 

Source
pub trait PathManager: SyncPathManager {
    // Required method
    fn path_wait(
        &self,
        src: IsdAsn,
        dst: IsdAsn,
        now: SystemTime,
    ) -> impl Future<Output = Result<ScionPath, PathWaitError>> + Send + '_;

    // Provided methods
    fn path_timeout(
        &self,
        src: IsdAsn,
        dst: IsdAsn,
        now: SystemTime,
        timeout: Duration,
    ) -> impl Future<Output = Result<ScionPath, PathWaitTimeoutError>> + Send + '_ { ... }
    fn scmp_error_receiver(
        self: Arc<Self>,
    ) -> Option<Arc<dyn ScmpErrorReceiver>> { ... }
    fn send_error_receiver(
        self: Arc<Self>,
    ) -> Option<Arc<dyn SendErrorReceiver>> { ... }
}
Expand description

Trait for active path management with async interface.

Required Methods§

Source

fn path_wait( &self, src: IsdAsn, dst: IsdAsn, now: SystemTime, ) -> impl Future<Output = Result<ScionPath, PathWaitError>> + Send + '_

Returns a path to the destination from the path cache or requests a new path from the SCION Control Plane.

Provided Methods§

Source

fn path_timeout( &self, src: IsdAsn, dst: IsdAsn, now: SystemTime, timeout: Duration, ) -> impl Future<Output = Result<ScionPath, PathWaitTimeoutError>> + Send + '_

Returns a path to the destination from the path cache or requests a new path from the SCION Control Plane, with a maximum wait time.

Source

fn scmp_error_receiver(self: Arc<Self>) -> Option<Arc<dyn ScmpErrorReceiver>>

Returns the receiver that can be used to report SCMP errors to the path manager. Returns None if the path manager does not support receiving SCMP errors.

Source

fn send_error_receiver(self: Arc<Self>) -> Option<Arc<dyn SendErrorReceiver>>

Returns the receiver that can be used to report send errors to the path manager. Returns None if the path manager does not support receiving send errors.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§