pub struct SingBoxCoreVersionProvider { /* private fields */ }Expand description
Reads the running sing-box version from the live Clash API /version.
This value is never inferred from the locked download manifest or the
executable path. The API reports sing-box <version>; the core identity
stores the canonical v<version> form used by operation evidence locks.
Implementations§
Source§impl SingBoxCoreVersionProvider
impl SingBoxCoreVersionProvider
Sourcepub fn new(api: SingBoxClashApiClient) -> Self
pub fn new(api: SingBoxClashApiClient) -> Self
Creates the version provider over one API client.
Sourcepub async fn observe(&self) -> Result<CoreVersion, PortError>
pub async fn observe(&self) -> Result<CoreVersion, PortError>
Reads the running core version from the live Clash API.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SingBoxCoreVersionProvider
impl !UnwindSafe for SingBoxCoreVersionProvider
impl Forget for SingBoxCoreVersionProvider
impl Freeze for SingBoxCoreVersionProvider
impl Move for SingBoxCoreVersionProvider
impl Send for SingBoxCoreVersionProvider
impl Sync for SingBoxCoreVersionProvider
impl Unpin for SingBoxCoreVersionProvider
impl UnsafeUnpin for SingBoxCoreVersionProvider
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