create_client_with_token

Function create_client_with_token 

Source
pub fn create_client_with_token(token: &SecretString) -> Result<Octocrab>
Expand description

Creates an authenticated Octocrab client using a provided token.

This function allows callers to provide a token directly, enabling multi-platform credential resolution (e.g., from iOS keychain via FFI).

§Arguments

  • token - GitHub API token as a SecretString

§Errors

Returns an error if the Octocrab client cannot be built.