pub enum TokenAuthError {
MissingCredentials(&'static str),
AuthenticationFailed(String),
NetworkError(Error),
}
Expand description
Errors that can occur during token-based authentication
These errors represent failures that may occur when attempting to authenticate using API tokens or JWT tokens.
§Example
use baserow_rs::{ConfigBuilder, Baserow, error::TokenAuthError, api::client::BaserowClient};
#[tokio::main]
async fn main() {
let config = ConfigBuilder::new()
.base_url("https://api.baserow.io")
.email("user@example.com")
.password("password")
.build();
let baserow = Baserow::with_configuration(config);
match baserow.token_auth().await {
Ok(client) => println!("Authentication successful"),
Err(TokenAuthError::MissingCredentials(field)) => {
println!("Missing required field: {}", field)
}
Err(e) => println!("Authentication failed: {}", e),
}
}
Variants§
Trait Implementations§
Source§impl Debug for TokenAuthError
impl Debug for TokenAuthError
Source§impl Display for TokenAuthError
impl Display for TokenAuthError
Source§impl Error for TokenAuthError
impl Error for TokenAuthError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for TokenAuthError
impl !RefUnwindSafe for TokenAuthError
impl Send for TokenAuthError
impl Sync for TokenAuthError
impl Unpin for TokenAuthError
impl !UnwindSafe for TokenAuthError
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