pub struct ProtectionOptions {
pub password_hash: Option<String>,
pub select_locked_cells: bool,
pub select_unlocked_cells: bool,
pub format_cells: bool,
pub format_columns: bool,
pub format_rows: bool,
pub insert_columns: bool,
pub insert_rows: bool,
pub delete_columns: bool,
pub delete_rows: bool,
pub sort: bool,
pub auto_filter: bool,
}Expand description
Worksheet protection options
Fields§
§password_hash: Option<String>Password hash (optional) - use set_password() to hash
select_locked_cells: boolAllow selecting locked cells (default: true)
select_unlocked_cells: boolAllow selecting unlocked cells (default: true)
format_cells: boolAllow formatting cells (default: false)
format_columns: boolAllow formatting columns (default: false)
format_rows: boolAllow formatting rows (default: false)
insert_columns: boolAllow inserting columns (default: false)
insert_rows: boolAllow inserting rows (default: false)
delete_columns: boolAllow deleting columns (default: false)
delete_rows: boolAllow deleting rows (default: false)
sort: boolAllow sorting (default: false)
auto_filter: boolAllow auto filter (default: false)
Implementations§
Source§impl ProtectionOptions
impl ProtectionOptions
Sourcepub fn with_password(self, password: &str) -> Self
pub fn with_password(self, password: &str) -> Self
Set password for protection (hashed with Excel’s algorithm)
Sourcepub fn allow_select_locked_cells(self, allow: bool) -> Self
pub fn allow_select_locked_cells(self, allow: bool) -> Self
Allow users to select locked cells
Sourcepub fn allow_select_unlocked_cells(self, allow: bool) -> Self
pub fn allow_select_unlocked_cells(self, allow: bool) -> Self
Allow users to select unlocked cells
Sourcepub fn allow_format_cells(self, allow: bool) -> Self
pub fn allow_format_cells(self, allow: bool) -> Self
Allow users to format cells
Sourcepub fn allow_format_columns(self, allow: bool) -> Self
pub fn allow_format_columns(self, allow: bool) -> Self
Allow users to format columns
Sourcepub fn allow_format_rows(self, allow: bool) -> Self
pub fn allow_format_rows(self, allow: bool) -> Self
Allow users to format rows
Sourcepub fn allow_insert_columns(self, allow: bool) -> Self
pub fn allow_insert_columns(self, allow: bool) -> Self
Allow users to insert columns
Sourcepub fn allow_insert_rows(self, allow: bool) -> Self
pub fn allow_insert_rows(self, allow: bool) -> Self
Allow users to insert rows
Sourcepub fn allow_delete_columns(self, allow: bool) -> Self
pub fn allow_delete_columns(self, allow: bool) -> Self
Allow users to delete columns
Sourcepub fn allow_delete_rows(self, allow: bool) -> Self
pub fn allow_delete_rows(self, allow: bool) -> Self
Allow users to delete rows
Sourcepub fn allow_sort(self, allow: bool) -> Self
pub fn allow_sort(self, allow: bool) -> Self
Allow users to sort
Sourcepub fn allow_auto_filter(self, allow: bool) -> Self
pub fn allow_auto_filter(self, allow: bool) -> Self
Allow users to use auto filter
Trait Implementations§
Source§impl Clone for ProtectionOptions
impl Clone for ProtectionOptions
Source§fn clone(&self) -> ProtectionOptions
fn clone(&self) -> ProtectionOptions
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProtectionOptions
impl Debug for ProtectionOptions
Auto Trait Implementations§
impl Freeze for ProtectionOptions
impl RefUnwindSafe for ProtectionOptions
impl Send for ProtectionOptions
impl Sync for ProtectionOptions
impl Unpin for ProtectionOptions
impl UnwindSafe for ProtectionOptions
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)