Skip to main content

DocApiProtection

Struct DocApiProtection 

Source
pub struct DocApiProtection<'a, I: Invoker> { /* private fields */ }

Implementations§

Source§

impl<'a, I: Invoker> DocApiProtection<'a, I>

Source

pub fn new(invoker: &'a I) -> Self

Source

pub fn clear_editing_restriction<'call>( &'call self, params: &'call DocProtectionClearEditingRestrictionBoundParams, ) -> impl Future<Output = Result<DocProtectionClearEditingRestrictionResult>> + Send + 'call

Disable document-level editing restriction by setting enforcement to off. Preserves the protection element and its metadata for round-trip fidelity.

Source

pub async fn clear_editing_restriction_with_options( &self, params: &DocProtectionClearEditingRestrictionBoundParams, options: InvokeOptions, ) -> Result<DocProtectionClearEditingRestrictionResult>

Disable document-level editing restriction by setting enforcement to off. Preserves the protection element and its metadata for round-trip fidelity.

Source

pub fn get<'call>( &'call self, params: &'call DocProtectionGetBoundParams, ) -> impl Future<Output = Result<DocProtectionGetResult>> + Send + 'call

Read the current document protection state including editing restrictions, write protection, and read-only recommendation.

Source

pub async fn get_with_options( &self, params: &DocProtectionGetBoundParams, options: InvokeOptions, ) -> Result<DocProtectionGetResult>

Read the current document protection state including editing restrictions, write protection, and read-only recommendation.

Source

pub fn set_editing_restriction<'call>( &'call self, params: &'call DocProtectionSetEditingRestrictionBoundParams, ) -> impl Future<Output = Result<DocProtectionSetEditingRestrictionResult>> + Send + 'call

Author a Word readOnly, comments, trackedChanges, or forms restriction. Inspect runtimeEnforced in the returned state: V2 currently enforces readOnly; the other modes are saved for Word and are not enforced in SuperDoc.

Source

pub async fn set_editing_restriction_with_options( &self, params: &DocProtectionSetEditingRestrictionBoundParams, options: InvokeOptions, ) -> Result<DocProtectionSetEditingRestrictionResult>

Author a Word readOnly, comments, trackedChanges, or forms restriction. Inspect runtimeEnforced in the returned state: V2 currently enforces readOnly; the other modes are saved for Word and are not enforced in SuperDoc.

Auto Trait Implementations§

§

impl<'a, I> Freeze for DocApiProtection<'a, I>
where &'a I: Freeze,

§

impl<'a, I> RefUnwindSafe for DocApiProtection<'a, I>

§

impl<'a, I> Send for DocApiProtection<'a, I>
where &'a I: Send,

§

impl<'a, I> Sync for DocApiProtection<'a, I>
where &'a I: Sync,

§

impl<'a, I> Unpin for DocApiProtection<'a, I>
where &'a I: Unpin,

§

impl<'a, I> UnsafeUnpin for DocApiProtection<'a, I>

§

impl<'a, I> UnwindSafe for DocApiProtection<'a, I>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.