pub struct Service { /* private fields */ }Expand description
The endpoint of one service, which its generated clients send calls to, and how they send them.
Implementations§
Source§impl Service
impl Service
Sourcepub fn with_options(&self, options: CallOptions) -> Self
pub fn with_options(&self, options: CallOptions) -> Self
The same endpoint, whose calls are sent as options says instead of
as the client’s settings do. The generated clients’
with_options call it.
Sourcepub fn options(&self) -> &CallOptions
pub fn options(&self) -> &CallOptions
How the calls are sent where they differ from the client’s settings.
Source§impl Service
impl Service
Sourcepub fn relative_name(
&self,
field: &str,
value: &str,
services: &[&str],
) -> Result<String, Error>
pub fn relative_name( &self, field: &str, value: &str, services: &[&str], ) -> Result<String, Error>
The relative name value, the path field field of a call to this
service, stands for: value itself, or the relative name of a full
resource name it is. The generated clients call it, and send the
relative name in the path and in the body alike.
services are the short codes of the services whose full names the
field takes: the service of the type the field refers to, such as
resourcemanager for a billing account’s parent
(organizations/*), ANY_SERVICE for
a field referring to any type, or none for this service’s own. A full
name of one of them, such as
//resourcemanager.origincloudapis.eu/organizations/o, stands for its
relative name. A full name of another service, one with a regional or
zonal host or an API version, a URN, a URL or a malformed full name is
refused, naming the hosts the field takes; see
FullName.
Sourcepub fn path_value(
&self,
field: &str,
value: &str,
pattern: &str,
services: &[&str],
) -> Result<String, Error>
pub fn path_value( &self, field: &str, value: &str, pattern: &str, services: &[&str], ) -> Result<String, Error>
value, the path field field of a call to this service, as the
path segments of the request: its relative_name,
checked against pattern and escaped as path_value does.