pub trait VpcService {
// Required methods
fn new_vpc(session: Session) -> Result<Vpc, Error>;
fn new_describe_vpcs(
&self,
request: DescribeVpcsReq,
) -> impl Future<Output = Result<DescribeVpcsResp, Error>>;
fn new_describe_subnets(
&self,
request: DescribeSubnetsReq,
) -> impl Future<Output = Result<DescribeSubnetsResp, Error>>;
}Expand description
Defines the VpcService trait, providing methods for various VPC operations. This trait encapsulates the functionality required to interact with the Volcengine VPC service.
Required Methods§
Sourcefn new_vpc(session: Session) -> Result<Vpc, Error>
fn new_vpc(session: Session) -> Result<Vpc, Error>
Creates a new VPC service instance from a given session.
§Arguments
session: The session object containing the necessary configuration and credentials.
§Returns
Result<Vpc, error::Error>: On success, returns a new instance of the Vpc struct. On failure, returns an error indicating the cause of the failure.
Sourcefn new_describe_vpcs(
&self,
request: DescribeVpcsReq,
) -> impl Future<Output = Result<DescribeVpcsResp, Error>>
fn new_describe_vpcs( &self, request: DescribeVpcsReq, ) -> impl Future<Output = Result<DescribeVpcsResp, Error>>
Describes VPCs.
§Arguments
&self: Reference to the current VPC service instance.request: The request structure containing the parameters for describing VPCs.
§Returns
impl Future<Output = Result<vpc_vpc::DescribeVpcsResp, error::Error>>: On success, returns a future that resolves to the response from the VPC service. On failure, returns an error indicating the cause of the failure.
Sourcefn new_describe_subnets(
&self,
request: DescribeSubnetsReq,
) -> impl Future<Output = Result<DescribeSubnetsResp, Error>>
fn new_describe_subnets( &self, request: DescribeSubnetsReq, ) -> impl Future<Output = Result<DescribeSubnetsResp, Error>>
Describes VPC subnets.
§Arguments
&self: Reference to the current VPC service instance.request: The request structure containing the parameters for describing VPC subnets.
§Returns
impl Future<Output = Result<vpc_subnet::DescribeSubnetsResp, error::Error>>: On success, returns a future that resolves to the response from the VPC service. On failure, returns an error indicating the cause of the failure.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl VpcService for Vpc
Implementation of the VpcService trait for the Vpc struct. This implementation provides the necessary logic to interact with the Volcengine VPC service, including creating a new VPC service instance, describing VPCs, and describing subnets.