/// Verify whether the filters configuration is valid.
Verify whether the filters configuration is valid.
Verify whether the filters configuration is valid .
pub fn validate(&self) -> Result<()> {
        if self.gzip.is_some() && self.szip.is_some() {
            fail!("Cannot specify two compression options at once.")
        }
        if let Some(level) = self.gzip {
            ensure!(level <= 9, "Invalid level for gzip compression, expected 0-9 integer.");
        }
        if let Some((_, pixels_per_block)) = self.szip {
            ensure!(
                pixels_per_block <= 32 && pixels_per_block % 2 == 0,
                "Invalid pixels per block for szip compression, expected even 0-32 integer."
            );
        }
        if let Some(offset) = self.scale_offset {
            ensure!(
                offset <= c_int::max_value() as _,
                "Scale-offset factor too large, maximum is {}.",
                c_int::max_value()
            );
        }
        if self.scale_offset.is_some() && self.fletcher32 {
            fail!("Cannot use lossy scale-offset filter with fletcher32.");
        }
        Ok(())
    }
pub fn validate ( & self ) -> Result < ( ) > { if self . gzip . is_some ( ) && self . szip . is_some ( ) { fail ! ( " " ) } if let Some ( level ) = self . gzip { ensure ! ( level 9 " " ) ; } if let Some ( ( _ , pixels_per_block ) ) = self . szip { ensure ! ( pixels_per_block 32 pixels_per_block 2 0 " " ) ; } if let Some ( offset ) = self . scale_offset { ensure ! ( offset c_int max_value ( ) as " " c_int max_value ( ) ) ; } if self . scale_offset . is_some ( ) && self . fletcher32 { fail ! ( " " ) ; } Ok ( ( ) ) }
Verify whether the filters configuration is valid.
Verify whether the filters configuration is valid .
&self