pub struct LARightStore { /* private fields */ }Expand description
Managed wrapper around Apple’s singleton LARightStore.
Implementations§
Source§impl LARightStore
impl LARightStore
Retain the framework singleton store.
§Errors
Returns an error if the API is unavailable or the Swift bridge rejects the request.
Sourcepub fn right_for_identifier(&self, identifier: &str) -> Result<LAPersistedRight>
pub fn right_for_identifier(&self, identifier: &str) -> Result<LAPersistedRight>
Fetch a persisted right by identifier.
§Errors
Returns a mapped framework or bridge error if the identifier does not resolve.
Sourcepub fn save_right(
&self,
right: &LARight,
identifier: &str,
) -> Result<LAPersistedRight>
pub fn save_right( &self, right: &LARight, identifier: &str, ) -> Result<LAPersistedRight>
Persist a right for later reuse.
§Errors
Returns a mapped framework or bridge error if persistence fails.
Sourcepub fn save_right_with_secret(
&self,
right: &LARight,
identifier: &str,
secret: &[u8],
) -> Result<LAPersistedRight>
pub fn save_right_with_secret( &self, right: &LARight, identifier: &str, secret: &[u8], ) -> Result<LAPersistedRight>
Persist a right together with secret data.
§Errors
Returns a mapped framework or bridge error if persistence fails.
Sourcepub fn remove_right(&self, right: &LAPersistedRight) -> Result<()>
pub fn remove_right(&self, right: &LAPersistedRight) -> Result<()>
Sourcepub fn remove_right_for_identifier(&self, identifier: &str) -> Result<()>
pub fn remove_right_for_identifier(&self, identifier: &str) -> Result<()>
Remove a persisted right by identifier.
§Errors
Returns a mapped framework or bridge error if removal fails.
Sourcepub fn remove_all_rights(&self) -> Result<()>
pub fn remove_all_rights(&self) -> Result<()>
Remove all rights owned by the current client.
§Errors
Returns a mapped framework or bridge error if removal fails.
Trait Implementations§
Auto Trait Implementations§
impl !Send for LARightStore
impl !Sync for LARightStore
impl Freeze for LARightStore
impl RefUnwindSafe for LARightStore
impl Unpin for LARightStore
impl UnsafeUnpin for LARightStore
impl UnwindSafe for LARightStore
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