I've got a trait which represents an entity that can be sent through UDP sockets:

```
pub trait ToNetEnt {
    const NET_SIZE: usize;

    fn from_net(data: &[u8]) -> Self;
    fn to_net(&self) -> &[u8];
}

```

Though there is an associated constant `NET_SIZE`, I couldn't use it in methods:

```
pub fn req<T: ToNetEnt>(&self) -> T {
    let buf: [u8; T::NET_SIZE];
}

```

because it causes this error:

```none
error[E0599]: no associated item named `NET_SIZE` found for type `T` in the current scope
  --> src/main.rs:10:23
   |
10 |         let buf: [u8; T::NET_SIZE];
   |                       ^^^^^^^^^^^ associated item not found in `T`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following trait defines an item `NET_SIZE`, perhaps you need to implement it:
           candidate #1: `ToNetEnt`

```

Can I use an associated constant in this context?