pub fn require_token(token: &Option<String>) -> Result<String, UserSideError> {
    match token {
        None => Err(UserSideError::AuthTokenRequired),
        Some(token) => Ok(token.to_string()),
    }
}
/// Sugar for extracting the string from Option<String> and returning auth error if it's
/// None
Sugar for extracting the string from Option and returning auth error if it's
None
Sugar for extracting the string from Option and returning auth error if it ' s None
pub fn require_token(token: &Option<String>) -> Result<String, UserSideError> {
    match token {
        None => Err(UserSideError::AuthTokenRequired),
        Some(token) => Ok(token.to_string()),
    }
}
pub fn require_token ( token : & Option < String > ) -> Result < String , UserSideError > { match token { None => Err ( UserSideError :: AuthTokenRequired ) , Some ( token ) => Ok ( token . to_string ( ) ) , } }
Sugar for extracting the string from Option<String> and returning auth error if it's
None
Sugar for extracting the string from Option<String > and returning auth error if it ' s None
token
&Option<String>
token
&Option<String>