pub struct LARight { /* private fields */ }Expand description
Managed wrapper around Apple’s LARight.
Implementations§
Source§impl LARight
impl LARight
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Create a right with the framework’s default authentication requirement.
§Errors
Returns an error if the API is unavailable or the Swift bridge rejects the request.
Sourcepub fn new_with_requirement(
requirement: &LAAuthenticationRequirement,
) -> Result<Self>
pub fn new_with_requirement( requirement: &LAAuthenticationRequirement, ) -> Result<Self>
Create a right with an explicit authentication requirement.
§Errors
Returns an error if the API is unavailable or the Swift bridge rejects the request.
Sourcepub fn state(&self) -> Result<LARightState>
pub fn state(&self) -> Result<LARightState>
Sourcepub fn tag(&self) -> Result<i64>
pub fn tag(&self) -> Result<i64>
Application-controlled integer tag.
§Errors
Returns an error if the Swift bridge rejects the request.
Sourcepub fn set_tag(&self, tag: i64) -> Result<()>
pub fn set_tag(&self, tag: i64) -> Result<()>
Update the application-controlled integer tag.
§Errors
Returns an error if the Swift bridge rejects the request.
Attempt to authorize the right.
§Errors
Returns a mapped framework or bridge error when authorization fails.
Preflight whether the right can eventually be authorized.
§Errors
Returns a mapped framework or bridge error when authorization is not possible.