pub enum ResetDirective {
SessionOnly,
Parameters,
SessionAndParameters,
}Expand description
What kind of context reset should be applied.
Variants§
SessionOnly
Only the session will be reset.
All parameters will be preserved (including the dictionary). But any frame being processed will be dropped.
It can be useful to start re-using a context after an error or when an ongoing compression is no longer needed.
Parameters
Only reset parameters (including dictionary or referenced prefix).
All parameters will be reset to default values.
This can only be done between sessions - no compression or decompression must be ongoing.
SessionAndParameters
Reset both the session and parameters.
The result is similar to a newly created context.
Implementations§
Source§impl ResetDirective
impl ResetDirective
Sourcepub(crate) fn resets_session(self) -> bool
pub(crate) fn resets_session(self) -> bool
Does this drop a session in progress?
Only a session reset brings a context back from the undefined state an
error can leave it in - Parameters alone is refused while a session is
open.
pub(crate) fn as_sys(self) -> ZSTD_ResetDirective
Trait Implementations§
Source§impl Clone for ResetDirective
impl Clone for ResetDirective
Source§fn clone(&self) -> ResetDirective
fn clone(&self) -> ResetDirective
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResetDirective
impl Debug for ResetDirective
Source§impl PartialEq for ResetDirective
impl PartialEq for ResetDirective
Source§fn eq(&self, other: &ResetDirective) -> bool
fn eq(&self, other: &ResetDirective) -> bool
self and other values to be equal, and is used by ==.