Hi,

I have a struct and want to extends its methods, like:

```d
struct Server
{
  string name;
  string ip;
  int port;
  string user;
}
```

extension method here:

```d
string prompt(ref in Server server)
{
   return server.user ~ "@" ~ server.ip ~ ":" ~ server.port;
}

```

and call it with UFSC:

```d
string p = server.prompt;
```

is this the correct way to use struct and UFCS? it does not seem to copy there.

Reply via email to