pub(crate) struct PageEncryptor {
file_encryptor: Arc<FileEncryptor>,
block_encryptor: Box<dyn BlockEncryptor>,
row_group_index: usize,
column_index: usize,
page_index: usize,
}
Expand description
Encrypts page headers and page data for columns
Fields§
§file_encryptor: Arc<FileEncryptor>
§block_encryptor: Box<dyn BlockEncryptor>
§row_group_index: usize
§column_index: usize
§page_index: usize
Implementations§
Source§impl PageEncryptor
impl PageEncryptor
Sourcepub fn create_if_column_encrypted(
file_encryptor: &Option<Arc<FileEncryptor>>,
row_group_index: usize,
column_index: usize,
column_path: &str,
) -> Result<Option<Self>>
pub fn create_if_column_encrypted( file_encryptor: &Option<Arc<FileEncryptor>>, row_group_index: usize, column_index: usize, column_path: &str, ) -> Result<Option<Self>>
Create a PageEncryptor
for a column if it should be encrypted
Sourcepub fn increment_page(&mut self)
pub fn increment_page(&mut self)
Update the page index after a data page has been processed
fn encrypt_page(&mut self, page: &CompressedPage) -> Result<Vec<u8>>
Sourcepub fn encrypt_compressed_page(
&mut self,
page: CompressedPage,
) -> Result<CompressedPage>
pub fn encrypt_compressed_page( &mut self, page: CompressedPage, ) -> Result<CompressedPage>
Encrypt compressed column page data
Sourcepub fn encrypt_page_header<W: Write>(
&mut self,
page_header: &PageHeader,
sink: &mut W,
) -> Result<()>
pub fn encrypt_page_header<W: Write>( &mut self, page_header: &PageHeader, sink: &mut W, ) -> Result<()>
Encrypt a column page header
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PageEncryptor
impl !RefUnwindSafe for PageEncryptor
impl Send for PageEncryptor
impl Sync for PageEncryptor
impl Unpin for PageEncryptor
impl !UnwindSafe for PageEncryptor
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
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>
Converts
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>
Converts
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