pub struct PicRuntimeConfig { /* private fields */ }Expand description
Runtime policy for resolving the PocketIC server binary used by PicBuilder.
Implementations§
Source§impl PicRuntimeConfig
impl PicRuntimeConfig
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Build a runtime config from supported environment variables.
Supported variables:
POCKET_IC_BIN: explicit trusted PocketIC server binary pathIC_TESTKIT_ALLOW_POCKET_IC_DOWNLOAD=1: allow network download on cache miss
Sourcepub fn pocket_ic_bin(self, path: impl Into<PathBuf>) -> Self
pub fn pocket_ic_bin(self, path: impl Into<PathBuf>) -> Self
Set an explicit PocketIC server binary path.
Sourcepub fn cache_dir(self, path: impl Into<PathBuf>) -> Self
pub fn cache_dir(self, path: impl Into<PathBuf>) -> Self
Set the cache root used for resolved PocketIC server binaries.
Sourcepub const fn allow_download(self, allow_download: bool) -> Self
pub const fn allow_download(self, allow_download: bool) -> Self
Allow or deny downloading the pinned PocketIC server binary on cache miss.
Sourcepub fn server_sha256(self, sha256: impl Into<String>) -> Self
pub fn server_sha256(self, sha256: impl Into<String>) -> Self
Set an expected SHA-256 digest for the ungzipped PocketIC server binary.
Sourcepub fn ensure_binary(&self) -> Result<PathBuf, PicStartError>
pub fn ensure_binary(&self) -> Result<PathBuf, PicStartError>
Resolve, validate, and optionally download the PocketIC server binary.
Trait Implementations§
Source§impl Clone for PicRuntimeConfig
impl Clone for PicRuntimeConfig
Source§fn clone(&self) -> PicRuntimeConfig
fn clone(&self) -> PicRuntimeConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PicRuntimeConfig
impl Debug for PicRuntimeConfig
Source§impl Default for PicRuntimeConfig
impl Default for PicRuntimeConfig
Source§fn default() -> PicRuntimeConfig
fn default() -> PicRuntimeConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for PicRuntimeConfig
impl PartialEq for PicRuntimeConfig
Source§fn eq(&self, other: &PicRuntimeConfig) -> bool
fn eq(&self, other: &PicRuntimeConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for PicRuntimeConfig
impl StructuralPartialEq for PicRuntimeConfig
Auto Trait Implementations§
impl Freeze for PicRuntimeConfig
impl RefUnwindSafe for PicRuntimeConfig
impl Send for PicRuntimeConfig
impl Sync for PicRuntimeConfig
impl Unpin for PicRuntimeConfig
impl UnsafeUnpin for PicRuntimeConfig
impl UnwindSafe for PicRuntimeConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.