pub struct RetractDirective {
pub key: String,
pub owns: fn(value: &str, context: &str) -> bool,
pub context: String,
}Expand description
A directive the provider once wrote on a host and now withdraws.
A key the same host also lists in directives is written rather than
withdrawn: the provider wants that value, so the rule is skipped.
The provider decides whether the value on disk is one of its own, because only it knows the shape it writes. A transport’s command usually follows the vendor’s published line, so its opening is exactly what a user who set the same thing up by hand would have typed; recognizing one by its opening would delete the other. A value the provider does not claim is left alone, so the worst case is a stale line the user can see and delete, never a line silently removed.
Fields§
§key: StringThe directive keyword, e.g. ProxyCommand.
owns: fn(value: &str, context: &str) -> boolWhether value is one this provider wrote. context carries whatever
the decision needs, which for AWS is the region. A plain function
pointer rather than a closure, so ProviderHost stays Clone.
context: StringImplementations§
Trait Implementations§
Source§impl Clone for RetractDirective
impl Clone for RetractDirective
Source§fn clone(&self) -> RetractDirective
fn clone(&self) -> RetractDirective
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RetractDirective
impl RefUnwindSafe for RetractDirective
impl Send for RetractDirective
impl Sync for RetractDirective
impl Unpin for RetractDirective
impl UnsafeUnpin for RetractDirective
impl UnwindSafe for RetractDirective
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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