pub struct Credentials { /* private fields */ }Expand description
Manages the browser context’s virtual WebAuthn authenticator.
Implementations§
Source§impl Credentials
impl Credentials
Sourcepub async fn install(&self) -> Result<()>
pub async fn install(&self) -> Result<()>
Installs a virtual WebAuthn authenticator on the context. Call before
registering credentials or driving navigator.credentials ceremonies.
§Errors
Returns error if:
- The browser context has been closed
- Communication with the browser process fails
See: https://playwright.dev/docs/api/class-credentials#credentials-install
Sourcepub async fn create(
&self,
rp_id: &str,
options: impl Into<Option<CredentialsCreateOptions>>,
) -> Result<VirtualCredential>
pub async fn create( &self, rp_id: &str, options: impl Into<Option<CredentialsCreateOptions>>, ) -> Result<VirtualCredential>
Registers a virtual credential scoped to rp_id, returning the created
credential (with any authenticator-generated fields filled in).
§Errors
Returns error if:
- The browser context has been closed
- Communication with the browser process fails
See: https://playwright.dev/docs/api/class-credentials#credentials-create
Sourcepub async fn get(
&self,
options: impl Into<Option<CredentialsGetOptions>>,
) -> Result<Vec<VirtualCredential>>
pub async fn get( &self, options: impl Into<Option<CredentialsGetOptions>>, ) -> Result<Vec<VirtualCredential>>
Lists virtual credentials, optionally filtered by relying-party or ID.
§Errors
Returns error if:
- The browser context has been closed
- Communication with the browser process fails
See: https://playwright.dev/docs/api/class-credentials#credentials-get
Trait Implementations§
Source§impl Clone for Credentials
impl Clone for Credentials
Source§fn clone(&self) -> Credentials
fn clone(&self) -> Credentials
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for Credentials
impl !UnwindSafe for Credentials
impl Freeze for Credentials
impl Send for Credentials
impl Sync for Credentials
impl Unpin for Credentials
impl UnsafeUnpin for Credentials
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