pub unsafe trait ASWebAuthenticationPresentationContextProviding: NSObjectProtocol + MainThreadOnly {
// Provided method
unsafe fn presentationAnchorForWebAuthenticationSession(
&self,
session: &ASWebAuthenticationSession,
) -> Retained<ASPresentationAnchor>
where Self: Sized + Message { ... }
}Available on crate feature
ASWebAuthenticationSession only.Expand description
Provides context to target where in an application’s UI the authorization view should be shown.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn presentationAnchorForWebAuthenticationSession(
&self,
session: &ASWebAuthenticationSession,
) -> Retained<ASPresentationAnchor>
Available on macOS and crate feature ASFoundation only.
unsafe fn presentationAnchorForWebAuthenticationSession( &self, session: &ASWebAuthenticationSession, ) -> Retained<ASPresentationAnchor>
ASFoundation only.Return the ASPresentationAnchor in the closest proximity to where a user interacted with your app to trigger authentication. If starting an ASWebAuthenticationSession on first launch, use the application’s main window.
Parameter session: The session requesting a presentation anchor.
Returns: The ASPresentationAnchor most closely associated with the UI used to trigger authentication.
Trait Implementations§
impl<T> ImplementedBy<T> for dyn ASWebAuthenticationPresentationContextProviding
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".