Enum tor_config::Reconfigure
source · #[non_exhaustive]pub enum Reconfigure {
AllOrNothing,
WarnOnFailures,
CheckAllOrNothing,
}
Expand description
Rules for reconfiguring a running Arti instance.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AllOrNothing
Perform no reconfiguration unless we can guarantee that all changes will be successful.
WarnOnFailures
Try to reconfigure as much as possible; warn on fields that we cannot reconfigure.
CheckAllOrNothing
Don’t reconfigure anything: Only check whether we can guarantee that all changes will be successful.
Implementations§
source§impl Reconfigure
impl Reconfigure
sourcepub fn cannot_change<S: AsRef<str>>(
self,
field: S
) -> Result<(), ReconfigureError>
pub fn cannot_change<S: AsRef<str>>( self, field: S ) -> Result<(), ReconfigureError>
Called when we see a disallowed attempt to change field
: either give a ReconfigureError,
or warn and return Ok(())
, depending on the value of self
.
Trait Implementations§
source§impl Clone for Reconfigure
impl Clone for Reconfigure
source§fn clone(&self) -> Reconfigure
fn clone(&self) -> Reconfigure
Returns a copy of the value. Read more
1.0.0 · 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 Reconfigure
impl Debug for Reconfigure
source§impl PartialEq for Reconfigure
impl PartialEq for Reconfigure
source§fn eq(&self, other: &Reconfigure) -> bool
fn eq(&self, other: &Reconfigure) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for Reconfigure
impl Eq for Reconfigure
impl StructuralEq for Reconfigure
impl StructuralPartialEq for Reconfigure
Auto Trait Implementations§
impl RefUnwindSafe for Reconfigure
impl Send for Reconfigure
impl Sync for Reconfigure
impl Unpin for Reconfigure
impl UnwindSafe for Reconfigure
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.