pub struct CodecPolicyPatch {
pub source_codec: Option<Option<String>>,
pub source_position: Option<DecodePosition>,
pub decode_limits: Option<DecodeLimits>,
pub source_budget: Option<FaceBudget>,
pub result_codec: Option<Option<String>>,
pub result_position: Option<EncodePosition>,
pub result_budget: Option<FaceBudget>,
}Expand description
Patch applied at the tree, directory, or cell policy level.
Codec selectors are stable exported names, not process-local CodecId
values. The nested option permits a descendant to explicitly clear an
inherited source or result codec.
Fields§
§source_codec: Option<Option<String>>Inherit, clear, or replace the source codec name.
source_position: Option<DecodePosition>Replace the source decode/encode position.
decode_limits: Option<DecodeLimits>Replace the bounded source decode limits.
source_budget: Option<FaceBudget>Replace the source-face resource budget.
result_codec: Option<Option<String>>Inherit, clear, or replace the result codec name.
result_position: Option<EncodePosition>Replace the result encode position.
result_budget: Option<FaceBudget>Replace the result-face resource budget.
Implementations§
Source§impl CodecPolicyPatch
impl CodecPolicyPatch
Sourcepub fn set_codec(codec: impl Into<String>) -> Self
pub fn set_codec(codec: impl Into<String>) -> Self
Selects the same codec for source and result faces.
Sourcepub fn clear_codec() -> Self
pub fn clear_codec() -> Self
Clears inherited source and result codecs.
Sourcepub fn source_codec(codec: impl Into<String>) -> Self
pub fn source_codec(codec: impl Into<String>) -> Self
Selects a source codec without changing any other field.
Sourcepub fn result_codec(codec: impl Into<String>) -> Self
pub fn result_codec(codec: impl Into<String>) -> Self
Selects a result codec without changing any other field.
Trait Implementations§
Source§impl Clone for CodecPolicyPatch
impl Clone for CodecPolicyPatch
Source§fn clone(&self) -> CodecPolicyPatch
fn clone(&self) -> CodecPolicyPatch
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 CodecPolicyPatch
impl Debug for CodecPolicyPatch
Source§impl Default for CodecPolicyPatch
impl Default for CodecPolicyPatch
Source§fn default() -> CodecPolicyPatch
fn default() -> CodecPolicyPatch
Returns the “default value” for a type. Read more
impl Eq for CodecPolicyPatch
Source§impl PartialEq for CodecPolicyPatch
impl PartialEq for CodecPolicyPatch
impl StructuralPartialEq for CodecPolicyPatch
Auto Trait Implementations§
impl Freeze for CodecPolicyPatch
impl RefUnwindSafe for CodecPolicyPatch
impl Send for CodecPolicyPatch
impl Sync for CodecPolicyPatch
impl Unpin for CodecPolicyPatch
impl UnsafeUnpin for CodecPolicyPatch
impl UnwindSafe for CodecPolicyPatch
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