---
title: GrpcBackend
summary: An extension trait to support gRPC backend definition.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/experimental/trait.GrpcBackend/
---

**Kind:** Trait  
**Module:** [experimental](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/experimental/)  
**Package:** fastly 0.13.1  
**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/experimental.rs#404

```rust
pub trait GrpcBackend {
    // Required method
    fn for_grpc(self, value: bool) -> Self;
}
```

An extension trait to support gRPC backend definition.

## Methods

### for_grpc

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/experimental.rs#419

```rust
fn for_grpc(self, value: bool) -> Self
```

Set whether or not this backend will be used for gRPC traffic.

Warning: Using for_grpc will cause Fastly to assume that the origin server accepts
HTTP/2 traffic natively: either directly (for HTTP), or via an HTTP/2-only ALPN
negotiation (for HTTPS). Connections will fail if the server attempts to negotiate
a different connection type in any way.

Stability: Fastly's support for gRPC is under ongoing development. Certain forms of
gRPC traffic are known to work, and work well; typically, these are gRPC flows in
which a client opens a connection to a server, makes a small number of requests,
waits for responses, and then closes the connection. Flows in which many requests
are sent over a single connection are unlikely to work. Users should expect
changes to supported flows as we refine our ability to handle gRPC requests over
time.

**Parameters**

- `self`: `Self`
- `value`: `bool`

**Returns**

`Self`
