pub struct ReplyPolicy {
pub accept_legacy_free_text_idempotence: bool,
}Expand description
How much a caller is willing to infer from a non-conforming peer.
The default infers nothing: an outcome is decided from the error code
alone.
Fields§
§accept_legacy_free_text_idempotence: boolDEPRECATED — opt-in compatibility only, removed in the next MAJOR.
Also treat a taskFailed whose free-text message contains
already_granted: or not_granted: as WriteOutcome::IdempotentSuccess.
This is how the classification worked before 0.10.0, and it was wrong:
SPEC §8.2 defines message as non-normative free text “intended for
logs and operator UI”. Deciding an outcome from it means the client’s
behaviour hinges on wording the emitting service may reword, translate
or drop at any time — and, in the other direction, that a genuine
taskFailed whose operator message happens to quote the phrase is
silently reported to the caller as success.
Enable this only while a specific peer still emits the free-text form,
and only after confirming there is no code-bearing alternative. The
correct fix is on the emitting side: send
GIT_TRUST_ALREADY_GRANTED_CODE / GIT_TRUST_NOT_GRANTED_CODE,
which SPEC §8.5 provides for exactly this and the registry entries
already declare.
Implementations§
Source§impl ReplyPolicy
impl ReplyPolicy
Sourcepub fn with_legacy_free_text() -> Self
pub fn with_legacy_free_text() -> Self
DEPRECATED: additionally accept the pre-0.10 free-text form. See
Self::accept_legacy_free_text_idempotence.
Trait Implementations§
Source§impl Clone for ReplyPolicy
impl Clone for ReplyPolicy
Source§fn clone(&self) -> ReplyPolicy
fn clone(&self) -> ReplyPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more