Function ccash_rs::methods::add_user[][src]

pub async fn add_user(
    session: &CCashSession,
    user: &CCashUser
) -> Result<bool, CCashError>
Expand description

Adds a user with a balance of 0.

Returns:

  • Ok(true) if the user was created successfully on the CCash instance.
  • Ok(false) if the user failed to be created on the CCash instance. This either happens only an a 409 response from the instance or if the feature “interpret_endpoint_errors_as_false” is enabled.
  • Error(CCashError) if the instance returns an error response (other than a 409) and the feature “interpret_endpoint_errors_as_false” is disabled.