pub struct FleetInventory { /* private fields */ }Expand description
The read-only inventory adapter.
Implementations§
Source§impl FleetInventory
impl FleetInventory
Sourcepub fn new(fleet: ReadOnlyFleet, chain: Arc<ChainManager>, label: &str) -> Self
pub fn new(fleet: ReadOnlyFleet, chain: Arc<ChainManager>, label: &str) -> Self
Inventory over a read-only fleet. label names the credential
(never its value) in chain events.
Sourcepub async fn candidates(
&self,
region: Option<&str>,
) -> Result<Vec<FleetCandidate>, FleetError>
pub async fn candidates( &self, region: Option<&str>, ) -> Result<Vec<FleetCandidate>, FleetError>
Read the fleet (optionally one region) and chain the read.
Sourcepub async fn cross_check(
&self,
candidates: &[FleetCandidate],
rt: &SeedApiRuntime,
) -> Result<FleetCheck, FleetError>
pub async fn cross_check( &self, candidates: &[FleetCandidate], rt: &SeedApiRuntime, ) -> Result<FleetCheck, FleetError>
Compare the locally paired Seed (rt’s own GET /api/v1/identity)
with the cloud’s listing. A different key for the same device id is
refused and chained.
Auto Trait Implementations§
impl !RefUnwindSafe for FleetInventory
impl !UnwindSafe for FleetInventory
impl Freeze for FleetInventory
impl Send for FleetInventory
impl Sync for FleetInventory
impl Unpin for FleetInventory
impl UnsafeUnpin for FleetInventory
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more