title: How to verify if a data source name is valid?
body: <p>I am using <a href="https://docs.rs/mysql/16.0.2/mysql/struct.OptsBuilder.html" rel="nofollow noreferrer"><code>OptsBuilder</code></a> passing a <a href="https://en.wikipedia.org/wiki/Data_source_name" rel="nofollow noreferrer">data source name</a> to create a connection pool:</p>
  
  <pre><code>let mut opts = mysql::OptsBuilder::from_opts(dsn);
  opts.stmt_cache_size(0);
  let pool = mysql::Pool::new_manual(1, 3, opts).expect("Could not connect to MySQL");
  </code></pre>
  
  <p>If I pass an invalid DSN, the code panics:</p>
  
  <pre class="lang-none prettyprint-override"><code>thread 'main' panicked at 'URL ParseError { relative URL without a base }', ', /path/.cargo/registry/src/github.com-1ecc6299db9ec823/mysql-16.0.2/src/conn/opts.rs:827:25
  </code></pre>
  
  <p>How can I handle the error or verify in advance to prevent panicking?</p>