# Using \`Url\` in diesel structs

**URL:** https://discourse.diesel.rs/t/using-url-in-diesel-structs/214
**Category:** Uncategorized
**Created:** [January 22, 2021, 4:02pm UTC](https://discourse.diesel.rs/t/using-url-in-diesel-structs/214 "2021-01-22T16:02:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![nutomic](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@nutomic](https://discourse.diesel.rs/u/nutomic)
#### Post date: [January 22, 2021, 4:02pm UTC](https://discourse.diesel.rs/t/using-url-in-diesel-structs/214/1 "2021-01-22T16:02:11Z")

</div>

I am wondering if there is any way to use the `url::Url` type from the [url](https://crates.io/crates/url) crate in diesel structs, such as this:

```auto
#[derive(Clone, Queryable, Identifiable, PartialEq, Debug, Serialize)]
#[table_name = "community"]
pub struct Community {
  pub id: i32,
  pub actor_id: Url,
  ...
}

```

The code above fails to compile with these errors:  
`the trait AppearsOnTableschema::community::table is not implemented for Url`  
`the trait diesel::Expression is not implemented for Url`

I couldnt find any documentation for implementing these traits, could you point me to those docs if they exist? Of course it is also possible that the traits need to be implemented either in `diesel` or in `url` directly. In that case I would open an issue, but I have no idea which project I should open the issue in.

[Here is the issue for this in our repo](https://github.com/LemmyNet/lemmy/issues/1364)
