pub struct Probe {
pub server: bool,
pub peers: bool,
pub cache: bool,
}Expand description
What a reading may cost: whether it may ask the server, ask the peer board, and use the checkout’s cache for answers that spawn git.
use majordomus_cli::environment::preflight::Probe;
let entry = Probe::entry();
assert!(entry.server && !entry.peers, "entry asks the server and not the board");
assert!(!Probe::sealed().server);Fields§
§server: boolAsk the published server’s address.
peers: boolAsk the peer board, which gathers every checkout’s and costs tens of milliseconds.
cache: boolRead and write the checkout’s cache for answers that cost git processes. Never for a served request: a request with a side effect on the repository would be a defect.
Implementations§
Source§impl Probe
impl Probe
Sourcepub fn entry() -> Self
pub fn entry() -> Self
What entering a directory pays for: one loopback request, no board.
use majordomus_cli::environment::preflight::Probe;
assert!(Probe::entry().server);Trait Implementations§
impl Copy for Probe
impl Eq for Probe
impl StructuralPartialEq for Probe
Auto Trait Implementations§
impl Freeze for Probe
impl RefUnwindSafe for Probe
impl Send for Probe
impl Sync for Probe
impl Unpin for Probe
impl UnsafeUnpin for Probe
impl UnwindSafe for Probe
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.