pub struct SingBoxRoutingIntentAdapter { /* private fields */ }Expand description
The observed sing-box /configs.mode value remains engine-defined. sing-box
uses it to select rule clash_mode branches; it does not mean one of the
neutral routing policies. Writes remain disabled until their behavior is
verified against a real enabled clash_mode configuration.
Implementations§
Source§impl SingBoxRoutingIntentAdapter
impl SingBoxRoutingIntentAdapter
Sourcepub fn new(
api: SingBoxClashApiClient,
scope_source: Arc<dyn CoreScopeSource>,
) -> Self
pub fn new( api: SingBoxClashApiClient, scope_source: Arc<dyn CoreScopeSource>, ) -> Self
Creates the routing-intent adapter over one API client and scope source.
Trait Implementations§
Source§impl RoutingIntentPort for SingBoxRoutingIntentAdapter
impl RoutingIntentPort for SingBoxRoutingIntentAdapter
Source§fn observe<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 CoreScope,
) -> Pin<Box<dyn Future<Output = Result<RoutingIntent, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn observe<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 CoreScope,
) -> Pin<Box<dyn Future<Output = Result<RoutingIntent, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Observe the active intent for the supplied owner-authored scope.
Source§fn apply<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 CoreScope,
intent: RoutingIntent,
) -> Pin<Box<dyn Future<Output = Result<RoutingIntent, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn apply<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 CoreScope,
intent: RoutingIntent,
) -> Pin<Box<dyn Future<Output = Result<RoutingIntent, PortError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Apply a value and return the value read back from the core.
Auto Trait Implementations§
impl !RefUnwindSafe for SingBoxRoutingIntentAdapter
impl !UnwindSafe for SingBoxRoutingIntentAdapter
impl Forget for SingBoxRoutingIntentAdapter
impl Freeze for SingBoxRoutingIntentAdapter
impl Move for SingBoxRoutingIntentAdapter
impl Send for SingBoxRoutingIntentAdapter
impl Sync for SingBoxRoutingIntentAdapter
impl Unpin for SingBoxRoutingIntentAdapter
impl UnsafeUnpin for SingBoxRoutingIntentAdapter
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