1312 1320 | Error = ::std::convert::Infallible,
|
1313 1321 | > + Clone
|
1314 1322 | + Send
|
1315 1323 | + 'static,
|
1316 1324 | S::Future: Send + 'static,
|
1317 1325 | {
|
1318 1326 | self.document_type_as_payload = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
1319 1327 | self
|
1320 1328 | }
|
1321 1329 |
|
1322 - | /// Sets the [`EmptyInputAndEmptyOutput`](crate::operation_shape::EmptyInputAndEmptyOutput) operation.
|
1330 + | /// Sets the [`DuplexStream`](crate::operation_shape::DuplexStream) operation.
|
1323 1331 | ///
|
1324 1332 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
1325 1333 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
1326 1334 | ///
|
1327 1335 | /// # Example
|
1328 1336 | ///
|
1329 1337 | /// ```no_run
|
1330 1338 | /// use rest_json::{RestJson, RestJsonConfig};
|
1331 1339 | ///
|
1332 1340 | /// use rest_json::{input, output, error};
|
1333 1341 | ///
|
1334 - | /// async fn handler(input: input::EmptyInputAndEmptyOutputInput) -> output::EmptyInputAndEmptyOutputOutput {
|
1342 + | /// async fn handler(input: input::DuplexStreamInput) -> Result<output::DuplexStreamOutput, error::DuplexStreamError> {
|
1335 1343 | /// todo!()
|
1336 1344 | /// }
|
1337 1345 | ///
|
1338 1346 | /// let config = RestJsonConfig::builder().build();
|
1339 1347 | /// let app = RestJson::builder(config)
|
1340 - | /// .empty_input_and_empty_output(handler)
|
1348 + | /// .duplex_stream(handler)
|
1341 1349 | /// /* Set other handlers */
|
1342 1350 | /// .build()
|
1343 1351 | /// .unwrap();
|
1344 1352 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1345 1353 | /// ```
|
1346 1354 | ///
|
1347 - | pub fn empty_input_and_empty_output<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1355 + | pub fn duplex_stream<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1348 1356 | where
|
1349 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::EmptyInputAndEmptyOutput, HandlerExtractors>,
|
1357 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::DuplexStream, HandlerExtractors>,
|
1350 1358 |
|
1351 1359 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
1352 1360 | RestJson<L>,
|
1353 - | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1354 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::EmptyInputAndEmptyOutput, HandlerType>
|
1361 + | crate::operation_shape::DuplexStream,
|
1362 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::DuplexStream, HandlerType>
|
1355 1363 | >,
|
1356 1364 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
1357 1365 | RestJson<L>,
|
1358 - | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1366 + | crate::operation_shape::DuplexStream,
|
1359 1367 | ModelPl::Output
|
1360 1368 | >,
|
1361 1369 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
1362 1370 | RestJson<L>,
|
1363 - | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1371 + | crate::operation_shape::DuplexStream,
|
1364 1372 | <
|
1365 1373 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1366 1374 | as ::aws_smithy_http_server::plugin::Plugin<
|
1367 1375 | RestJson<L>,
|
1368 - | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1376 + | crate::operation_shape::DuplexStream,
|
1369 1377 | ModelPl::Output
|
1370 1378 | >
|
1371 1379 | >::Output
|
1372 1380 | >,
|
1373 1381 |
|
1374 1382 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1375 1383 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
1376 1384 |
|
1377 1385 | {
|
1378 1386 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
1379 1387 | use ::aws_smithy_http_server::plugin::Plugin;
|
1380 - | let svc = crate::operation_shape::EmptyInputAndEmptyOutput::from_handler(handler);
|
1388 + | let svc = crate::operation_shape::DuplexStream::from_handler(handler);
|
1381 1389 | let svc = self.model_plugin.apply(svc);
|
1382 1390 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1383 1391 | .apply(svc);
|
1384 1392 | let svc = self.http_plugin.apply(svc);
|
1385 - | self.empty_input_and_empty_output_custom(svc)
|
1393 + | self.duplex_stream_custom(svc)
|
1386 1394 | }
|
1387 1395 |
|
1388 - | /// Sets the [`EmptyInputAndEmptyOutput`](crate::operation_shape::EmptyInputAndEmptyOutput) operation.
|
1396 + | /// Sets the [`DuplexStream`](crate::operation_shape::DuplexStream) operation.
|
1389 1397 | ///
|
1390 1398 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
1391 1399 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
1392 1400 | ///
|
1393 1401 | /// # Example
|
1394 1402 | ///
|
1395 1403 | /// ```no_run
|
1396 1404 | /// use rest_json::{RestJson, RestJsonConfig};
|
1397 1405 | ///
|
1398 1406 | /// use rest_json::{input, output, error};
|
1399 1407 | ///
|
1400 - | /// async fn handler(input: input::EmptyInputAndEmptyOutputInput) -> Result<output::EmptyInputAndEmptyOutputOutput, std::convert::Infallible> {
|
1408 + | /// async fn handler(input: input::DuplexStreamInput) -> Result<output::DuplexStreamOutput, error::DuplexStreamError> {
|
1401 1409 | /// todo!()
|
1402 1410 | /// }
|
1403 1411 | ///
|
1404 1412 | /// let config = RestJsonConfig::builder().build();
|
1405 1413 | /// let svc = ::tower::util::service_fn(handler);
|
1406 1414 | /// let app = RestJson::builder(config)
|
1407 - | /// .empty_input_and_empty_output_service(svc)
|
1415 + | /// .duplex_stream_service(svc)
|
1408 1416 | /// /* Set other handlers */
|
1409 1417 | /// .build()
|
1410 1418 | /// .unwrap();
|
1411 1419 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1412 1420 | /// ```
|
1413 1421 | ///
|
1414 - | pub fn empty_input_and_empty_output_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
1422 + | pub fn duplex_stream_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
1415 1423 | where
|
1416 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::EmptyInputAndEmptyOutput, ServiceExtractors>,
|
1424 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::DuplexStream, ServiceExtractors>,
|
1417 1425 |
|
1418 1426 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
1419 1427 | RestJson<L>,
|
1420 - | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1421 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::EmptyInputAndEmptyOutput, S>
|
1428 + | crate::operation_shape::DuplexStream,
|
1429 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::DuplexStream, S>
|
1422 1430 | >,
|
1423 1431 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
1424 1432 | RestJson<L>,
|
1425 - | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1433 + | crate::operation_shape::DuplexStream,
|
1426 1434 | ModelPl::Output
|
1427 1435 | >,
|
1428 1436 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
1429 1437 | RestJson<L>,
|
1430 - | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1438 + | crate::operation_shape::DuplexStream,
|
1431 1439 | <
|
1432 1440 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1433 1441 | as ::aws_smithy_http_server::plugin::Plugin<
|
1434 1442 | RestJson<L>,
|
1435 - | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1443 + | crate::operation_shape::DuplexStream,
|
1436 1444 | ModelPl::Output
|
1437 1445 | >
|
1438 1446 | >::Output
|
1439 1447 | >,
|
1440 1448 |
|
1441 1449 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1442 1450 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
1443 1451 |
|
1444 1452 | {
|
1445 1453 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
1446 1454 | use ::aws_smithy_http_server::plugin::Plugin;
|
1447 - | let svc = crate::operation_shape::EmptyInputAndEmptyOutput::from_service(service);
|
1455 + | let svc = crate::operation_shape::DuplexStream::from_service(service);
|
1448 1456 | let svc = self.model_plugin.apply(svc);
|
1449 1457 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1450 1458 | .apply(svc);
|
1451 1459 | let svc = self.http_plugin.apply(svc);
|
1452 - | self.empty_input_and_empty_output_custom(svc)
|
1460 + | self.duplex_stream_custom(svc)
|
1453 1461 | }
|
1454 1462 |
|
1455 - | /// Sets the [`EmptyInputAndEmptyOutput`](crate::operation_shape::EmptyInputAndEmptyOutput) to a custom [`Service`](tower::Service).
|
1463 + | /// Sets the [`DuplexStream`](crate::operation_shape::DuplexStream) to a custom [`Service`](tower::Service).
|
1456 1464 | /// not constrained by the Smithy contract.
|
1457 - | fn empty_input_and_empty_output_custom<S>(mut self, svc: S) -> Self
|
1465 + | fn duplex_stream_custom<S>(mut self, svc: S) -> Self
|
1458 1466 | where
|
1459 1467 | S: ::tower::Service<
|
1460 1468 | ::http_1x::Request<Body>,
|
1461 1469 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
1462 1470 | Error = ::std::convert::Infallible,
|
1463 1471 | > + Clone
|
1464 1472 | + Send
|
1465 1473 | + 'static,
|
1466 1474 | S::Future: Send + 'static,
|
1467 1475 | {
|
1468 - | self.empty_input_and_empty_output =
|
1469 - | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
1476 + | self.duplex_stream = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
1470 1477 | self
|
1471 1478 | }
|
1472 1479 |
|
1473 - | /// Sets the [`EndpointOperation`](crate::operation_shape::EndpointOperation) operation.
|
1480 + | /// Sets the [`DuplexStreamWithDistinctStreams`](crate::operation_shape::DuplexStreamWithDistinctStreams) operation.
|
1474 1481 | ///
|
1475 1482 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
1476 1483 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
1477 1484 | ///
|
1478 1485 | /// # Example
|
1479 1486 | ///
|
1480 1487 | /// ```no_run
|
1481 1488 | /// use rest_json::{RestJson, RestJsonConfig};
|
1482 1489 | ///
|
1483 1490 | /// use rest_json::{input, output, error};
|
1484 1491 | ///
|
1485 - | /// async fn handler(input: input::EndpointOperationInput) -> output::EndpointOperationOutput {
|
1492 + | /// async fn handler(input: input::DuplexStreamWithDistinctStreamsInput) -> Result<output::DuplexStreamWithDistinctStreamsOutput, error::DuplexStreamWithDistinctStreamsError> {
|
1486 1493 | /// todo!()
|
1487 1494 | /// }
|
1488 1495 | ///
|
1489 1496 | /// let config = RestJsonConfig::builder().build();
|
1490 1497 | /// let app = RestJson::builder(config)
|
1491 - | /// .endpoint_operation(handler)
|
1498 + | /// .duplex_stream_with_distinct_streams(handler)
|
1492 1499 | /// /* Set other handlers */
|
1493 1500 | /// .build()
|
1494 1501 | /// .unwrap();
|
1495 1502 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1496 1503 | /// ```
|
1497 1504 | ///
|
1498 - | pub fn endpoint_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1505 + | pub fn duplex_stream_with_distinct_streams<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1499 1506 | where
|
1500 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::EndpointOperation, HandlerExtractors>,
|
1507 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::DuplexStreamWithDistinctStreams, HandlerExtractors>,
|
1501 1508 |
|
1502 1509 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
1503 1510 | RestJson<L>,
|
1504 - | crate::operation_shape::EndpointOperation,
|
1505 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::EndpointOperation, HandlerType>
|
1511 + | crate::operation_shape::DuplexStreamWithDistinctStreams,
|
1512 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::DuplexStreamWithDistinctStreams, HandlerType>
|
1506 1513 | >,
|
1507 1514 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
1508 1515 | RestJson<L>,
|
1509 - | crate::operation_shape::EndpointOperation,
|
1516 + | crate::operation_shape::DuplexStreamWithDistinctStreams,
|
1510 1517 | ModelPl::Output
|
1511 1518 | >,
|
1512 1519 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
1513 1520 | RestJson<L>,
|
1514 - | crate::operation_shape::EndpointOperation,
|
1521 + | crate::operation_shape::DuplexStreamWithDistinctStreams,
|
1515 1522 | <
|
1516 1523 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1517 1524 | as ::aws_smithy_http_server::plugin::Plugin<
|
1518 1525 | RestJson<L>,
|
1519 - | crate::operation_shape::EndpointOperation,
|
1526 + | crate::operation_shape::DuplexStreamWithDistinctStreams,
|
1520 1527 | ModelPl::Output
|
1521 1528 | >
|
1522 1529 | >::Output
|
1523 1530 | >,
|
1524 1531 |
|
1525 1532 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1526 1533 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
1527 1534 |
|
1528 1535 | {
|
1529 1536 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
1530 1537 | use ::aws_smithy_http_server::plugin::Plugin;
|
1531 - | let svc = crate::operation_shape::EndpointOperation::from_handler(handler);
|
1538 + | let svc = crate::operation_shape::DuplexStreamWithDistinctStreams::from_handler(handler);
|
1532 1539 | let svc = self.model_plugin.apply(svc);
|
1533 1540 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1534 1541 | .apply(svc);
|
1535 1542 | let svc = self.http_plugin.apply(svc);
|
1536 - | self.endpoint_operation_custom(svc)
|
1543 + | self.duplex_stream_with_distinct_streams_custom(svc)
|
1537 1544 | }
|
1538 1545 |
|
1539 - | /// Sets the [`EndpointOperation`](crate::operation_shape::EndpointOperation) operation.
|
1546 + | /// Sets the [`DuplexStreamWithDistinctStreams`](crate::operation_shape::DuplexStreamWithDistinctStreams) operation.
|
1540 1547 | ///
|
1541 1548 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
1542 1549 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
1543 1550 | ///
|
1544 1551 | /// # Example
|
1545 1552 | ///
|
1546 1553 | /// ```no_run
|
1547 1554 | /// use rest_json::{RestJson, RestJsonConfig};
|
1548 1555 | ///
|
1549 1556 | /// use rest_json::{input, output, error};
|
1550 1557 | ///
|
1551 - | /// async fn handler(input: input::EndpointOperationInput) -> Result<output::EndpointOperationOutput, std::convert::Infallible> {
|
1558 + | /// async fn handler(input: input::DuplexStreamWithDistinctStreamsInput) -> Result<output::DuplexStreamWithDistinctStreamsOutput, error::DuplexStreamWithDistinctStreamsError> {
|
1552 1559 | /// todo!()
|
1553 1560 | /// }
|
1554 1561 | ///
|
1555 1562 | /// let config = RestJsonConfig::builder().build();
|
1556 1563 | /// let svc = ::tower::util::service_fn(handler);
|
1557 1564 | /// let app = RestJson::builder(config)
|
1558 - | /// .endpoint_operation_service(svc)
|
1565 + | /// .duplex_stream_with_distinct_streams_service(svc)
|
1559 1566 | /// /* Set other handlers */
|
1560 1567 | /// .build()
|
1561 1568 | /// .unwrap();
|
1562 1569 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1563 1570 | /// ```
|
1564 1571 | ///
|
1565 - | pub fn endpoint_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
1572 + | pub fn duplex_stream_with_distinct_streams_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
1566 1573 | where
|
1567 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::EndpointOperation, ServiceExtractors>,
|
1574 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::DuplexStreamWithDistinctStreams, ServiceExtractors>,
|
1568 1575 |
|
1569 1576 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
1570 1577 | RestJson<L>,
|
1571 - | crate::operation_shape::EndpointOperation,
|
1572 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::EndpointOperation, S>
|
1578 + | crate::operation_shape::DuplexStreamWithDistinctStreams,
|
1579 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::DuplexStreamWithDistinctStreams, S>
|
1573 1580 | >,
|
1574 1581 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
1575 1582 | RestJson<L>,
|
1576 - | crate::operation_shape::EndpointOperation,
|
1583 + | crate::operation_shape::DuplexStreamWithDistinctStreams,
|
1577 1584 | ModelPl::Output
|
1578 1585 | >,
|
1579 1586 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
1580 1587 | RestJson<L>,
|
1581 - | crate::operation_shape::EndpointOperation,
|
1588 + | crate::operation_shape::DuplexStreamWithDistinctStreams,
|
1582 1589 | <
|
1583 1590 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1584 1591 | as ::aws_smithy_http_server::plugin::Plugin<
|
1585 1592 | RestJson<L>,
|
1586 - | crate::operation_shape::EndpointOperation,
|
1593 + | crate::operation_shape::DuplexStreamWithDistinctStreams,
|
1587 1594 | ModelPl::Output
|
1588 1595 | >
|
1589 1596 | >::Output
|
1590 1597 | >,
|
1591 1598 |
|
1592 1599 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1593 1600 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
1594 1601 |
|
1595 1602 | {
|
1596 1603 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
1597 1604 | use ::aws_smithy_http_server::plugin::Plugin;
|
1598 - | let svc = crate::operation_shape::EndpointOperation::from_service(service);
|
1605 + | let svc = crate::operation_shape::DuplexStreamWithDistinctStreams::from_service(service);
|
1599 1606 | let svc = self.model_plugin.apply(svc);
|
1600 1607 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1601 1608 | .apply(svc);
|
1602 1609 | let svc = self.http_plugin.apply(svc);
|
1603 - | self.endpoint_operation_custom(svc)
|
1610 + | self.duplex_stream_with_distinct_streams_custom(svc)
|
1604 1611 | }
|
1605 1612 |
|
1606 - | /// Sets the [`EndpointOperation`](crate::operation_shape::EndpointOperation) to a custom [`Service`](tower::Service).
|
1613 + | /// Sets the [`DuplexStreamWithDistinctStreams`](crate::operation_shape::DuplexStreamWithDistinctStreams) to a custom [`Service`](tower::Service).
|
1607 1614 | /// not constrained by the Smithy contract.
|
1608 - | fn endpoint_operation_custom<S>(mut self, svc: S) -> Self
|
1615 + | fn duplex_stream_with_distinct_streams_custom<S>(mut self, svc: S) -> Self
|
1609 1616 | where
|
1610 1617 | S: ::tower::Service<
|
1611 1618 | ::http_1x::Request<Body>,
|
1612 1619 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
1613 1620 | Error = ::std::convert::Infallible,
|
1614 1621 | > + Clone
|
1615 1622 | + Send
|
1616 1623 | + 'static,
|
1617 1624 | S::Future: Send + 'static,
|
1618 1625 | {
|
1619 - | self.endpoint_operation = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
1626 + | self.duplex_stream_with_distinct_streams =
|
1627 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
1620 1628 | self
|
1621 1629 | }
|
1622 1630 |
|
1623 - | /// Sets the [`EndpointWithHostLabelOperation`](crate::operation_shape::EndpointWithHostLabelOperation) operation.
|
1631 + | /// Sets the [`DuplexStreamWithInitialMessages`](crate::operation_shape::DuplexStreamWithInitialMessages) operation.
|
1624 1632 | ///
|
1625 1633 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
1626 1634 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
1627 1635 | ///
|
1628 1636 | /// # Example
|
1629 1637 | ///
|
1630 1638 | /// ```no_run
|
1631 1639 | /// use rest_json::{RestJson, RestJsonConfig};
|
1632 1640 | ///
|
1633 1641 | /// use rest_json::{input, output, error};
|
1634 1642 | ///
|
1635 - | /// async fn handler(input: input::EndpointWithHostLabelOperationInput) -> Result<output::EndpointWithHostLabelOperationOutput, error::EndpointWithHostLabelOperationError> {
|
1643 + | /// async fn handler(input: input::DuplexStreamWithInitialMessagesInput) -> Result<output::DuplexStreamWithInitialMessagesOutput, error::DuplexStreamWithInitialMessagesError> {
|
1636 1644 | /// todo!()
|
1637 1645 | /// }
|
1638 1646 | ///
|
1639 1647 | /// let config = RestJsonConfig::builder().build();
|
1640 1648 | /// let app = RestJson::builder(config)
|
1641 - | /// .endpoint_with_host_label_operation(handler)
|
1649 + | /// .duplex_stream_with_initial_messages(handler)
|
1642 1650 | /// /* Set other handlers */
|
1643 1651 | /// .build()
|
1644 1652 | /// .unwrap();
|
1645 1653 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1646 1654 | /// ```
|
1647 1655 | ///
|
1648 - | pub fn endpoint_with_host_label_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1656 + | pub fn duplex_stream_with_initial_messages<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1649 1657 | where
|
1650 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::EndpointWithHostLabelOperation, HandlerExtractors>,
|
1658 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::DuplexStreamWithInitialMessages, HandlerExtractors>,
|
1651 1659 |
|
1652 1660 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
1653 1661 | RestJson<L>,
|
1654 - | crate::operation_shape::EndpointWithHostLabelOperation,
|
1655 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::EndpointWithHostLabelOperation, HandlerType>
|
1662 + | crate::operation_shape::DuplexStreamWithInitialMessages,
|
1663 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::DuplexStreamWithInitialMessages, HandlerType>
|
1656 1664 | >,
|
1657 1665 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
1658 1666 | RestJson<L>,
|
1659 - | crate::operation_shape::EndpointWithHostLabelOperation,
|
1667 + | crate::operation_shape::DuplexStreamWithInitialMessages,
|
1660 1668 | ModelPl::Output
|
1661 1669 | >,
|
1662 1670 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
1663 1671 | RestJson<L>,
|
1664 - | crate::operation_shape::EndpointWithHostLabelOperation,
|
1672 + | crate::operation_shape::DuplexStreamWithInitialMessages,
|
1665 1673 | <
|
1666 1674 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1667 1675 | as ::aws_smithy_http_server::plugin::Plugin<
|
1668 1676 | RestJson<L>,
|
1669 - | crate::operation_shape::EndpointWithHostLabelOperation,
|
1677 + | crate::operation_shape::DuplexStreamWithInitialMessages,
|
1670 1678 | ModelPl::Output
|
1671 1679 | >
|
1672 1680 | >::Output
|
1673 1681 | >,
|
1674 1682 |
|
1675 1683 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1676 1684 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
1677 1685 |
|
1678 1686 | {
|
1679 1687 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
1680 1688 | use ::aws_smithy_http_server::plugin::Plugin;
|
1681 - | let svc = crate::operation_shape::EndpointWithHostLabelOperation::from_handler(handler);
|
1689 + | let svc = crate::operation_shape::DuplexStreamWithInitialMessages::from_handler(handler);
|
1682 1690 | let svc = self.model_plugin.apply(svc);
|
1683 1691 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1684 1692 | .apply(svc);
|
1685 1693 | let svc = self.http_plugin.apply(svc);
|
1686 - | self.endpoint_with_host_label_operation_custom(svc)
|
1694 + | self.duplex_stream_with_initial_messages_custom(svc)
|
1687 1695 | }
|
1688 1696 |
|
1689 - | /// Sets the [`EndpointWithHostLabelOperation`](crate::operation_shape::EndpointWithHostLabelOperation) operation.
|
1697 + | /// Sets the [`DuplexStreamWithInitialMessages`](crate::operation_shape::DuplexStreamWithInitialMessages) operation.
|
1690 1698 | ///
|
1691 1699 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
1692 1700 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
1693 1701 | ///
|
1694 1702 | /// # Example
|
1695 1703 | ///
|
1696 1704 | /// ```no_run
|
1697 1705 | /// use rest_json::{RestJson, RestJsonConfig};
|
1698 1706 | ///
|
1699 1707 | /// use rest_json::{input, output, error};
|
1700 1708 | ///
|
1701 - | /// async fn handler(input: input::EndpointWithHostLabelOperationInput) -> Result<output::EndpointWithHostLabelOperationOutput, error::EndpointWithHostLabelOperationError> {
|
1709 + | /// async fn handler(input: input::DuplexStreamWithInitialMessagesInput) -> Result<output::DuplexStreamWithInitialMessagesOutput, error::DuplexStreamWithInitialMessagesError> {
|
1702 1710 | /// todo!()
|
1703 1711 | /// }
|
1704 1712 | ///
|
1705 1713 | /// let config = RestJsonConfig::builder().build();
|
1706 1714 | /// let svc = ::tower::util::service_fn(handler);
|
1707 1715 | /// let app = RestJson::builder(config)
|
1708 - | /// .endpoint_with_host_label_operation_service(svc)
|
1716 + | /// .duplex_stream_with_initial_messages_service(svc)
|
1709 1717 | /// /* Set other handlers */
|
1710 1718 | /// .build()
|
1711 1719 | /// .unwrap();
|
1712 1720 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1713 1721 | /// ```
|
1714 1722 | ///
|
1715 - | pub fn endpoint_with_host_label_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
1723 + | pub fn duplex_stream_with_initial_messages_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
1716 1724 | where
|
1717 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::EndpointWithHostLabelOperation, ServiceExtractors>,
|
1725 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::DuplexStreamWithInitialMessages, ServiceExtractors>,
|
1718 1726 |
|
1719 1727 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
1720 1728 | RestJson<L>,
|
1721 - | crate::operation_shape::EndpointWithHostLabelOperation,
|
1722 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::EndpointWithHostLabelOperation, S>
|
1729 + | crate::operation_shape::DuplexStreamWithInitialMessages,
|
1730 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::DuplexStreamWithInitialMessages, S>
|
1723 1731 | >,
|
1724 1732 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
1725 1733 | RestJson<L>,
|
1726 - | crate::operation_shape::EndpointWithHostLabelOperation,
|
1734 + | crate::operation_shape::DuplexStreamWithInitialMessages,
|
1727 1735 | ModelPl::Output
|
1728 1736 | >,
|
1729 1737 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
1730 1738 | RestJson<L>,
|
1731 - | crate::operation_shape::EndpointWithHostLabelOperation,
|
1739 + | crate::operation_shape::DuplexStreamWithInitialMessages,
|
1732 1740 | <
|
1733 1741 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1734 1742 | as ::aws_smithy_http_server::plugin::Plugin<
|
1735 1743 | RestJson<L>,
|
1736 - | crate::operation_shape::EndpointWithHostLabelOperation,
|
1744 + | crate::operation_shape::DuplexStreamWithInitialMessages,
|
1737 1745 | ModelPl::Output
|
1738 1746 | >
|
1739 1747 | >::Output
|
1740 1748 | >,
|
1741 1749 |
|
1742 1750 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1743 1751 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
1744 1752 |
|
1745 1753 | {
|
1746 1754 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
1747 1755 | use ::aws_smithy_http_server::plugin::Plugin;
|
1748 - | let svc = crate::operation_shape::EndpointWithHostLabelOperation::from_service(service);
|
1756 + | let svc = crate::operation_shape::DuplexStreamWithInitialMessages::from_service(service);
|
1749 1757 | let svc = self.model_plugin.apply(svc);
|
1750 1758 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1751 1759 | .apply(svc);
|
1752 1760 | let svc = self.http_plugin.apply(svc);
|
1753 - | self.endpoint_with_host_label_operation_custom(svc)
|
1761 + | self.duplex_stream_with_initial_messages_custom(svc)
|
1754 1762 | }
|
1755 1763 |
|
1756 - | /// Sets the [`EndpointWithHostLabelOperation`](crate::operation_shape::EndpointWithHostLabelOperation) to a custom [`Service`](tower::Service).
|
1764 + | /// Sets the [`DuplexStreamWithInitialMessages`](crate::operation_shape::DuplexStreamWithInitialMessages) to a custom [`Service`](tower::Service).
|
1757 1765 | /// not constrained by the Smithy contract.
|
1758 - | fn endpoint_with_host_label_operation_custom<S>(mut self, svc: S) -> Self
|
1766 + | fn duplex_stream_with_initial_messages_custom<S>(mut self, svc: S) -> Self
|
1759 1767 | where
|
1760 1768 | S: ::tower::Service<
|
1761 1769 | ::http_1x::Request<Body>,
|
1762 1770 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
1763 1771 | Error = ::std::convert::Infallible,
|
1764 1772 | > + Clone
|
1765 1773 | + Send
|
1766 1774 | + 'static,
|
1767 1775 | S::Future: Send + 'static,
|
1768 1776 | {
|
1769 - | self.endpoint_with_host_label_operation =
|
1777 + | self.duplex_stream_with_initial_messages =
|
1770 1778 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
1771 1779 | self
|
1772 1780 | }
|
1773 1781 |
|
1774 - | /// Sets the [`FractionalSeconds`](crate::operation_shape::FractionalSeconds) operation.
|
1782 + | /// Sets the [`EmptyInputAndEmptyOutput`](crate::operation_shape::EmptyInputAndEmptyOutput) operation.
|
1775 1783 | ///
|
1776 1784 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
1777 1785 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
1778 1786 | ///
|
1779 1787 | /// # Example
|
1780 1788 | ///
|
1781 1789 | /// ```no_run
|
1782 1790 | /// use rest_json::{RestJson, RestJsonConfig};
|
1783 1791 | ///
|
1784 1792 | /// use rest_json::{input, output, error};
|
1785 1793 | ///
|
1786 - | /// async fn handler(input: input::FractionalSecondsInput) -> output::FractionalSecondsOutput {
|
1794 + | /// async fn handler(input: input::EmptyInputAndEmptyOutputInput) -> output::EmptyInputAndEmptyOutputOutput {
|
1787 1795 | /// todo!()
|
1788 1796 | /// }
|
1789 1797 | ///
|
1790 1798 | /// let config = RestJsonConfig::builder().build();
|
1791 1799 | /// let app = RestJson::builder(config)
|
1792 - | /// .fractional_seconds(handler)
|
1800 + | /// .empty_input_and_empty_output(handler)
|
1793 1801 | /// /* Set other handlers */
|
1794 1802 | /// .build()
|
1795 1803 | /// .unwrap();
|
1796 1804 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1797 1805 | /// ```
|
1798 1806 | ///
|
1799 - | pub fn fractional_seconds<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1807 + | pub fn empty_input_and_empty_output<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1800 1808 | where
|
1801 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::FractionalSeconds, HandlerExtractors>,
|
1809 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::EmptyInputAndEmptyOutput, HandlerExtractors>,
|
1802 1810 |
|
1803 1811 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
1804 1812 | RestJson<L>,
|
1805 - | crate::operation_shape::FractionalSeconds,
|
1806 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::FractionalSeconds, HandlerType>
|
1813 + | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1814 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::EmptyInputAndEmptyOutput, HandlerType>
|
1807 1815 | >,
|
1808 1816 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
1809 1817 | RestJson<L>,
|
1810 - | crate::operation_shape::FractionalSeconds,
|
1818 + | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1811 1819 | ModelPl::Output
|
1812 1820 | >,
|
1813 1821 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
1814 1822 | RestJson<L>,
|
1815 - | crate::operation_shape::FractionalSeconds,
|
1823 + | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1816 1824 | <
|
1817 1825 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1818 1826 | as ::aws_smithy_http_server::plugin::Plugin<
|
1819 1827 | RestJson<L>,
|
1820 - | crate::operation_shape::FractionalSeconds,
|
1828 + | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1821 1829 | ModelPl::Output
|
1822 1830 | >
|
1823 1831 | >::Output
|
1824 1832 | >,
|
1825 1833 |
|
1826 1834 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1827 1835 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
1828 1836 |
|
1829 1837 | {
|
1830 1838 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
1831 1839 | use ::aws_smithy_http_server::plugin::Plugin;
|
1832 - | let svc = crate::operation_shape::FractionalSeconds::from_handler(handler);
|
1840 + | let svc = crate::operation_shape::EmptyInputAndEmptyOutput::from_handler(handler);
|
1833 1841 | let svc = self.model_plugin.apply(svc);
|
1834 1842 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1835 1843 | .apply(svc);
|
1836 1844 | let svc = self.http_plugin.apply(svc);
|
1837 - | self.fractional_seconds_custom(svc)
|
1845 + | self.empty_input_and_empty_output_custom(svc)
|
1838 1846 | }
|
1839 1847 |
|
1840 - | /// Sets the [`FractionalSeconds`](crate::operation_shape::FractionalSeconds) operation.
|
1848 + | /// Sets the [`EmptyInputAndEmptyOutput`](crate::operation_shape::EmptyInputAndEmptyOutput) operation.
|
1841 1849 | ///
|
1842 1850 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
1843 1851 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
1844 1852 | ///
|
1845 1853 | /// # Example
|
1846 1854 | ///
|
1847 1855 | /// ```no_run
|
1848 1856 | /// use rest_json::{RestJson, RestJsonConfig};
|
1849 1857 | ///
|
1850 1858 | /// use rest_json::{input, output, error};
|
1851 1859 | ///
|
1852 - | /// async fn handler(input: input::FractionalSecondsInput) -> Result<output::FractionalSecondsOutput, std::convert::Infallible> {
|
1860 + | /// async fn handler(input: input::EmptyInputAndEmptyOutputInput) -> Result<output::EmptyInputAndEmptyOutputOutput, std::convert::Infallible> {
|
1853 1861 | /// todo!()
|
1854 1862 | /// }
|
1855 1863 | ///
|
1856 1864 | /// let config = RestJsonConfig::builder().build();
|
1857 1865 | /// let svc = ::tower::util::service_fn(handler);
|
1858 1866 | /// let app = RestJson::builder(config)
|
1859 - | /// .fractional_seconds_service(svc)
|
1867 + | /// .empty_input_and_empty_output_service(svc)
|
1860 1868 | /// /* Set other handlers */
|
1861 1869 | /// .build()
|
1862 1870 | /// .unwrap();
|
1863 1871 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1864 1872 | /// ```
|
1865 1873 | ///
|
1866 - | pub fn fractional_seconds_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
1874 + | pub fn empty_input_and_empty_output_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
1867 1875 | where
|
1868 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::FractionalSeconds, ServiceExtractors>,
|
1876 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::EmptyInputAndEmptyOutput, ServiceExtractors>,
|
1869 1877 |
|
1870 1878 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
1871 1879 | RestJson<L>,
|
1872 - | crate::operation_shape::FractionalSeconds,
|
1873 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::FractionalSeconds, S>
|
1880 + | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1881 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::EmptyInputAndEmptyOutput, S>
|
1874 1882 | >,
|
1875 1883 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
1876 1884 | RestJson<L>,
|
1877 - | crate::operation_shape::FractionalSeconds,
|
1885 + | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1878 1886 | ModelPl::Output
|
1879 1887 | >,
|
1880 1888 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
1881 1889 | RestJson<L>,
|
1882 - | crate::operation_shape::FractionalSeconds,
|
1890 + | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1883 1891 | <
|
1884 1892 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1885 1893 | as ::aws_smithy_http_server::plugin::Plugin<
|
1886 1894 | RestJson<L>,
|
1887 - | crate::operation_shape::FractionalSeconds,
|
1895 + | crate::operation_shape::EmptyInputAndEmptyOutput,
|
1888 1896 | ModelPl::Output
|
1889 1897 | >
|
1890 1898 | >::Output
|
1891 1899 | >,
|
1892 1900 |
|
1893 1901 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1894 1902 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
1895 1903 |
|
1896 1904 | {
|
1897 1905 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
1898 1906 | use ::aws_smithy_http_server::plugin::Plugin;
|
1899 - | let svc = crate::operation_shape::FractionalSeconds::from_service(service);
|
1907 + | let svc = crate::operation_shape::EmptyInputAndEmptyOutput::from_service(service);
|
1900 1908 | let svc = self.model_plugin.apply(svc);
|
1901 1909 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1902 1910 | .apply(svc);
|
1903 1911 | let svc = self.http_plugin.apply(svc);
|
1904 - | self.fractional_seconds_custom(svc)
|
1912 + | self.empty_input_and_empty_output_custom(svc)
|
1905 1913 | }
|
1906 1914 |
|
1907 - | /// Sets the [`FractionalSeconds`](crate::operation_shape::FractionalSeconds) to a custom [`Service`](tower::Service).
|
1915 + | /// Sets the [`EmptyInputAndEmptyOutput`](crate::operation_shape::EmptyInputAndEmptyOutput) to a custom [`Service`](tower::Service).
|
1908 1916 | /// not constrained by the Smithy contract.
|
1909 - | fn fractional_seconds_custom<S>(mut self, svc: S) -> Self
|
1917 + | fn empty_input_and_empty_output_custom<S>(mut self, svc: S) -> Self
|
1910 1918 | where
|
1911 1919 | S: ::tower::Service<
|
1912 1920 | ::http_1x::Request<Body>,
|
1913 1921 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
1914 1922 | Error = ::std::convert::Infallible,
|
1915 1923 | > + Clone
|
1916 1924 | + Send
|
1917 1925 | + 'static,
|
1918 1926 | S::Future: Send + 'static,
|
1919 1927 | {
|
1920 - | self.fractional_seconds = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
1928 + | self.empty_input_and_empty_output =
|
1929 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
1921 1930 | self
|
1922 1931 | }
|
1923 1932 |
|
1924 - | /// Sets the [`GreetingWithErrors`](crate::operation_shape::GreetingWithErrors) operation.
|
1933 + | /// Sets the [`EndpointOperation`](crate::operation_shape::EndpointOperation) operation.
|
1925 1934 | ///
|
1926 1935 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
1927 1936 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
1928 1937 | ///
|
1929 1938 | /// # Example
|
1930 1939 | ///
|
1931 1940 | /// ```no_run
|
1932 1941 | /// use rest_json::{RestJson, RestJsonConfig};
|
1933 1942 | ///
|
1934 1943 | /// use rest_json::{input, output, error};
|
1935 1944 | ///
|
1936 - | /// async fn handler(input: input::GreetingWithErrorsInput) -> Result<output::GreetingWithErrorsOutput, error::GreetingWithErrorsError> {
|
1945 + | /// async fn handler(input: input::EndpointOperationInput) -> output::EndpointOperationOutput {
|
1937 1946 | /// todo!()
|
1938 1947 | /// }
|
1939 1948 | ///
|
1940 1949 | /// let config = RestJsonConfig::builder().build();
|
1941 1950 | /// let app = RestJson::builder(config)
|
1942 - | /// .greeting_with_errors(handler)
|
1951 + | /// .endpoint_operation(handler)
|
1943 1952 | /// /* Set other handlers */
|
1944 1953 | /// .build()
|
1945 1954 | /// .unwrap();
|
1946 1955 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
1947 1956 | /// ```
|
1948 1957 | ///
|
1949 - | pub fn greeting_with_errors<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1958 + | pub fn endpoint_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
1950 1959 | where
|
1951 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::GreetingWithErrors, HandlerExtractors>,
|
1960 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::EndpointOperation, HandlerExtractors>,
|
1952 1961 |
|
1953 1962 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
1954 1963 | RestJson<L>,
|
1955 - | crate::operation_shape::GreetingWithErrors,
|
1956 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::GreetingWithErrors, HandlerType>
|
1964 + | crate::operation_shape::EndpointOperation,
|
1965 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::EndpointOperation, HandlerType>
|
1957 1966 | >,
|
1958 1967 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
1959 1968 | RestJson<L>,
|
1960 - | crate::operation_shape::GreetingWithErrors,
|
1969 + | crate::operation_shape::EndpointOperation,
|
1961 1970 | ModelPl::Output
|
1962 1971 | >,
|
1963 1972 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
1964 1973 | RestJson<L>,
|
1965 - | crate::operation_shape::GreetingWithErrors,
|
1974 + | crate::operation_shape::EndpointOperation,
|
1966 1975 | <
|
1967 1976 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
1968 1977 | as ::aws_smithy_http_server::plugin::Plugin<
|
1969 1978 | RestJson<L>,
|
1970 - | crate::operation_shape::GreetingWithErrors,
|
1979 + | crate::operation_shape::EndpointOperation,
|
1971 1980 | ModelPl::Output
|
1972 1981 | >
|
1973 1982 | >::Output
|
1974 1983 | >,
|
1975 1984 |
|
1976 1985 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
1977 1986 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
1978 1987 |
|
1979 1988 | {
|
1980 1989 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
1981 1990 | use ::aws_smithy_http_server::plugin::Plugin;
|
1982 - | let svc = crate::operation_shape::GreetingWithErrors::from_handler(handler);
|
1991 + | let svc = crate::operation_shape::EndpointOperation::from_handler(handler);
|
1983 1992 | let svc = self.model_plugin.apply(svc);
|
1984 1993 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
1985 1994 | .apply(svc);
|
1986 1995 | let svc = self.http_plugin.apply(svc);
|
1987 - | self.greeting_with_errors_custom(svc)
|
1996 + | self.endpoint_operation_custom(svc)
|
1988 1997 | }
|
1989 1998 |
|
1990 - | /// Sets the [`GreetingWithErrors`](crate::operation_shape::GreetingWithErrors) operation.
|
1999 + | /// Sets the [`EndpointOperation`](crate::operation_shape::EndpointOperation) operation.
|
1991 2000 | ///
|
1992 2001 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
1993 2002 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
1994 2003 | ///
|
1995 2004 | /// # Example
|
1996 2005 | ///
|
1997 2006 | /// ```no_run
|
1998 2007 | /// use rest_json::{RestJson, RestJsonConfig};
|
1999 2008 | ///
|
2000 2009 | /// use rest_json::{input, output, error};
|
2001 2010 | ///
|
2002 - | /// async fn handler(input: input::GreetingWithErrorsInput) -> Result<output::GreetingWithErrorsOutput, error::GreetingWithErrorsError> {
|
2011 + | /// async fn handler(input: input::EndpointOperationInput) -> Result<output::EndpointOperationOutput, std::convert::Infallible> {
|
2003 2012 | /// todo!()
|
2004 2013 | /// }
|
2005 2014 | ///
|
2006 2015 | /// let config = RestJsonConfig::builder().build();
|
2007 2016 | /// let svc = ::tower::util::service_fn(handler);
|
2008 2017 | /// let app = RestJson::builder(config)
|
2009 - | /// .greeting_with_errors_service(svc)
|
2018 + | /// .endpoint_operation_service(svc)
|
2010 2019 | /// /* Set other handlers */
|
2011 2020 | /// .build()
|
2012 2021 | /// .unwrap();
|
2013 2022 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2014 2023 | /// ```
|
2015 2024 | ///
|
2016 - | pub fn greeting_with_errors_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2025 + | pub fn endpoint_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2017 2026 | where
|
2018 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::GreetingWithErrors, ServiceExtractors>,
|
2027 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::EndpointOperation, ServiceExtractors>,
|
2019 2028 |
|
2020 2029 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
2021 2030 | RestJson<L>,
|
2022 - | crate::operation_shape::GreetingWithErrors,
|
2023 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::GreetingWithErrors, S>
|
2031 + | crate::operation_shape::EndpointOperation,
|
2032 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::EndpointOperation, S>
|
2024 2033 | >,
|
2025 2034 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
2026 2035 | RestJson<L>,
|
2027 - | crate::operation_shape::GreetingWithErrors,
|
2036 + | crate::operation_shape::EndpointOperation,
|
2028 2037 | ModelPl::Output
|
2029 2038 | >,
|
2030 2039 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
2031 2040 | RestJson<L>,
|
2032 - | crate::operation_shape::GreetingWithErrors,
|
2041 + | crate::operation_shape::EndpointOperation,
|
2033 2042 | <
|
2034 2043 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2035 2044 | as ::aws_smithy_http_server::plugin::Plugin<
|
2036 2045 | RestJson<L>,
|
2037 - | crate::operation_shape::GreetingWithErrors,
|
2046 + | crate::operation_shape::EndpointOperation,
|
2038 2047 | ModelPl::Output
|
2039 2048 | >
|
2040 2049 | >::Output
|
2041 2050 | >,
|
2042 2051 |
|
2043 2052 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2044 2053 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
2045 2054 |
|
2046 2055 | {
|
2047 2056 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
2048 2057 | use ::aws_smithy_http_server::plugin::Plugin;
|
2049 - | let svc = crate::operation_shape::GreetingWithErrors::from_service(service);
|
2058 + | let svc = crate::operation_shape::EndpointOperation::from_service(service);
|
2050 2059 | let svc = self.model_plugin.apply(svc);
|
2051 2060 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2052 2061 | .apply(svc);
|
2053 2062 | let svc = self.http_plugin.apply(svc);
|
2054 - | self.greeting_with_errors_custom(svc)
|
2063 + | self.endpoint_operation_custom(svc)
|
2055 2064 | }
|
2056 2065 |
|
2057 - | /// Sets the [`GreetingWithErrors`](crate::operation_shape::GreetingWithErrors) to a custom [`Service`](tower::Service).
|
2066 + | /// Sets the [`EndpointOperation`](crate::operation_shape::EndpointOperation) to a custom [`Service`](tower::Service).
|
2058 2067 | /// not constrained by the Smithy contract.
|
2059 - | fn greeting_with_errors_custom<S>(mut self, svc: S) -> Self
|
2068 + | fn endpoint_operation_custom<S>(mut self, svc: S) -> Self
|
2060 2069 | where
|
2061 2070 | S: ::tower::Service<
|
2062 2071 | ::http_1x::Request<Body>,
|
2063 2072 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
2064 2073 | Error = ::std::convert::Infallible,
|
2065 2074 | > + Clone
|
2066 2075 | + Send
|
2067 2076 | + 'static,
|
2068 2077 | S::Future: Send + 'static,
|
2069 2078 | {
|
2070 - | self.greeting_with_errors = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
2079 + | self.endpoint_operation = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
2071 2080 | self
|
2072 2081 | }
|
2073 2082 |
|
2074 - | /// Sets the [`HostWithPathOperation`](crate::operation_shape::HostWithPathOperation) operation.
|
2083 + | /// Sets the [`EndpointWithHostLabelOperation`](crate::operation_shape::EndpointWithHostLabelOperation) operation.
|
2075 2084 | ///
|
2076 2085 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
2077 2086 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
2078 2087 | ///
|
2079 2088 | /// # Example
|
2080 2089 | ///
|
2081 2090 | /// ```no_run
|
2082 2091 | /// use rest_json::{RestJson, RestJsonConfig};
|
2083 2092 | ///
|
2084 2093 | /// use rest_json::{input, output, error};
|
2085 2094 | ///
|
2086 - | /// async fn handler(input: input::HostWithPathOperationInput) -> output::HostWithPathOperationOutput {
|
2095 + | /// async fn handler(input: input::EndpointWithHostLabelOperationInput) -> Result<output::EndpointWithHostLabelOperationOutput, error::EndpointWithHostLabelOperationError> {
|
2087 2096 | /// todo!()
|
2088 2097 | /// }
|
2089 2098 | ///
|
2090 2099 | /// let config = RestJsonConfig::builder().build();
|
2091 2100 | /// let app = RestJson::builder(config)
|
2092 - | /// .host_with_path_operation(handler)
|
2101 + | /// .endpoint_with_host_label_operation(handler)
|
2093 2102 | /// /* Set other handlers */
|
2094 2103 | /// .build()
|
2095 2104 | /// .unwrap();
|
2096 2105 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2097 2106 | /// ```
|
2098 2107 | ///
|
2099 - | pub fn host_with_path_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2108 + | pub fn endpoint_with_host_label_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2100 2109 | where
|
2101 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HostWithPathOperation, HandlerExtractors>,
|
2110 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::EndpointWithHostLabelOperation, HandlerExtractors>,
|
2102 2111 |
|
2103 2112 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
2104 2113 | RestJson<L>,
|
2105 - | crate::operation_shape::HostWithPathOperation,
|
2106 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HostWithPathOperation, HandlerType>
|
2114 + | crate::operation_shape::EndpointWithHostLabelOperation,
|
2115 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::EndpointWithHostLabelOperation, HandlerType>
|
2107 2116 | >,
|
2108 2117 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
2109 2118 | RestJson<L>,
|
2110 - | crate::operation_shape::HostWithPathOperation,
|
2119 + | crate::operation_shape::EndpointWithHostLabelOperation,
|
2111 2120 | ModelPl::Output
|
2112 2121 | >,
|
2113 2122 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
2114 2123 | RestJson<L>,
|
2115 - | crate::operation_shape::HostWithPathOperation,
|
2124 + | crate::operation_shape::EndpointWithHostLabelOperation,
|
2116 2125 | <
|
2117 2126 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2118 2127 | as ::aws_smithy_http_server::plugin::Plugin<
|
2119 2128 | RestJson<L>,
|
2120 - | crate::operation_shape::HostWithPathOperation,
|
2129 + | crate::operation_shape::EndpointWithHostLabelOperation,
|
2121 2130 | ModelPl::Output
|
2122 2131 | >
|
2123 2132 | >::Output
|
2124 2133 | >,
|
2125 2134 |
|
2126 2135 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2127 2136 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
2128 2137 |
|
2129 2138 | {
|
2130 2139 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
2131 2140 | use ::aws_smithy_http_server::plugin::Plugin;
|
2132 - | let svc = crate::operation_shape::HostWithPathOperation::from_handler(handler);
|
2141 + | let svc = crate::operation_shape::EndpointWithHostLabelOperation::from_handler(handler);
|
2133 2142 | let svc = self.model_plugin.apply(svc);
|
2134 2143 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2135 2144 | .apply(svc);
|
2136 2145 | let svc = self.http_plugin.apply(svc);
|
2137 - | self.host_with_path_operation_custom(svc)
|
2146 + | self.endpoint_with_host_label_operation_custom(svc)
|
2138 2147 | }
|
2139 2148 |
|
2140 - | /// Sets the [`HostWithPathOperation`](crate::operation_shape::HostWithPathOperation) operation.
|
2149 + | /// Sets the [`EndpointWithHostLabelOperation`](crate::operation_shape::EndpointWithHostLabelOperation) operation.
|
2141 2150 | ///
|
2142 2151 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
2143 2152 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
2144 2153 | ///
|
2145 2154 | /// # Example
|
2146 2155 | ///
|
2147 2156 | /// ```no_run
|
2148 2157 | /// use rest_json::{RestJson, RestJsonConfig};
|
2149 2158 | ///
|
2150 2159 | /// use rest_json::{input, output, error};
|
2151 2160 | ///
|
2152 - | /// async fn handler(input: input::HostWithPathOperationInput) -> Result<output::HostWithPathOperationOutput, std::convert::Infallible> {
|
2161 + | /// async fn handler(input: input::EndpointWithHostLabelOperationInput) -> Result<output::EndpointWithHostLabelOperationOutput, error::EndpointWithHostLabelOperationError> {
|
2153 2162 | /// todo!()
|
2154 2163 | /// }
|
2155 2164 | ///
|
2156 2165 | /// let config = RestJsonConfig::builder().build();
|
2157 2166 | /// let svc = ::tower::util::service_fn(handler);
|
2158 2167 | /// let app = RestJson::builder(config)
|
2159 - | /// .host_with_path_operation_service(svc)
|
2168 + | /// .endpoint_with_host_label_operation_service(svc)
|
2160 2169 | /// /* Set other handlers */
|
2161 2170 | /// .build()
|
2162 2171 | /// .unwrap();
|
2163 2172 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2164 2173 | /// ```
|
2165 2174 | ///
|
2166 - | pub fn host_with_path_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2175 + | pub fn endpoint_with_host_label_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2167 2176 | where
|
2168 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HostWithPathOperation, ServiceExtractors>,
|
2177 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::EndpointWithHostLabelOperation, ServiceExtractors>,
|
2169 2178 |
|
2170 2179 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
2171 2180 | RestJson<L>,
|
2172 - | crate::operation_shape::HostWithPathOperation,
|
2173 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HostWithPathOperation, S>
|
2181 + | crate::operation_shape::EndpointWithHostLabelOperation,
|
2182 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::EndpointWithHostLabelOperation, S>
|
2174 2183 | >,
|
2175 2184 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
2176 2185 | RestJson<L>,
|
2177 - | crate::operation_shape::HostWithPathOperation,
|
2186 + | crate::operation_shape::EndpointWithHostLabelOperation,
|
2178 2187 | ModelPl::Output
|
2179 2188 | >,
|
2180 2189 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
2181 2190 | RestJson<L>,
|
2182 - | crate::operation_shape::HostWithPathOperation,
|
2191 + | crate::operation_shape::EndpointWithHostLabelOperation,
|
2183 2192 | <
|
2184 2193 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2185 2194 | as ::aws_smithy_http_server::plugin::Plugin<
|
2186 2195 | RestJson<L>,
|
2187 - | crate::operation_shape::HostWithPathOperation,
|
2196 + | crate::operation_shape::EndpointWithHostLabelOperation,
|
2188 2197 | ModelPl::Output
|
2189 2198 | >
|
2190 2199 | >::Output
|
2191 2200 | >,
|
2192 2201 |
|
2193 2202 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2194 2203 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
2195 2204 |
|
2196 2205 | {
|
2197 2206 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
2198 2207 | use ::aws_smithy_http_server::plugin::Plugin;
|
2199 - | let svc = crate::operation_shape::HostWithPathOperation::from_service(service);
|
2208 + | let svc = crate::operation_shape::EndpointWithHostLabelOperation::from_service(service);
|
2200 2209 | let svc = self.model_plugin.apply(svc);
|
2201 2210 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2202 2211 | .apply(svc);
|
2203 2212 | let svc = self.http_plugin.apply(svc);
|
2204 - | self.host_with_path_operation_custom(svc)
|
2213 + | self.endpoint_with_host_label_operation_custom(svc)
|
2205 2214 | }
|
2206 2215 |
|
2207 - | /// Sets the [`HostWithPathOperation`](crate::operation_shape::HostWithPathOperation) to a custom [`Service`](tower::Service).
|
2216 + | /// Sets the [`EndpointWithHostLabelOperation`](crate::operation_shape::EndpointWithHostLabelOperation) to a custom [`Service`](tower::Service).
|
2208 2217 | /// not constrained by the Smithy contract.
|
2209 - | fn host_with_path_operation_custom<S>(mut self, svc: S) -> Self
|
2218 + | fn endpoint_with_host_label_operation_custom<S>(mut self, svc: S) -> Self
|
2210 2219 | where
|
2211 2220 | S: ::tower::Service<
|
2212 2221 | ::http_1x::Request<Body>,
|
2213 2222 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
2214 2223 | Error = ::std::convert::Infallible,
|
2215 2224 | > + Clone
|
2216 2225 | + Send
|
2217 2226 | + 'static,
|
2218 2227 | S::Future: Send + 'static,
|
2219 2228 | {
|
2220 - | self.host_with_path_operation = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
2229 + | self.endpoint_with_host_label_operation =
|
2230 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
2221 2231 | self
|
2222 2232 | }
|
2223 2233 |
|
2224 - | /// Sets the [`HttpChecksumRequired`](crate::operation_shape::HttpChecksumRequired) operation.
|
2234 + | /// Sets the [`FractionalSeconds`](crate::operation_shape::FractionalSeconds) operation.
|
2225 2235 | ///
|
2226 2236 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
2227 2237 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
2228 2238 | ///
|
2229 2239 | /// # Example
|
2230 2240 | ///
|
2231 2241 | /// ```no_run
|
2232 2242 | /// use rest_json::{RestJson, RestJsonConfig};
|
2233 2243 | ///
|
2234 2244 | /// use rest_json::{input, output, error};
|
2235 2245 | ///
|
2236 - | /// async fn handler(input: input::HttpChecksumRequiredInput) -> output::HttpChecksumRequiredOutput {
|
2246 + | /// async fn handler(input: input::FractionalSecondsInput) -> output::FractionalSecondsOutput {
|
2237 2247 | /// todo!()
|
2238 2248 | /// }
|
2239 2249 | ///
|
2240 2250 | /// let config = RestJsonConfig::builder().build();
|
2241 2251 | /// let app = RestJson::builder(config)
|
2242 - | /// .http_checksum_required(handler)
|
2252 + | /// .fractional_seconds(handler)
|
2243 2253 | /// /* Set other handlers */
|
2244 2254 | /// .build()
|
2245 2255 | /// .unwrap();
|
2246 2256 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2247 2257 | /// ```
|
2248 2258 | ///
|
2249 - | pub fn http_checksum_required<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2259 + | pub fn fractional_seconds<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2250 2260 | where
|
2251 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpChecksumRequired, HandlerExtractors>,
|
2261 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::FractionalSeconds, HandlerExtractors>,
|
2252 2262 |
|
2253 2263 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
2254 2264 | RestJson<L>,
|
2255 - | crate::operation_shape::HttpChecksumRequired,
|
2256 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpChecksumRequired, HandlerType>
|
2265 + | crate::operation_shape::FractionalSeconds,
|
2266 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::FractionalSeconds, HandlerType>
|
2257 2267 | >,
|
2258 2268 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
2259 2269 | RestJson<L>,
|
2260 - | crate::operation_shape::HttpChecksumRequired,
|
2270 + | crate::operation_shape::FractionalSeconds,
|
2261 2271 | ModelPl::Output
|
2262 2272 | >,
|
2263 2273 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
2264 2274 | RestJson<L>,
|
2265 - | crate::operation_shape::HttpChecksumRequired,
|
2275 + | crate::operation_shape::FractionalSeconds,
|
2266 2276 | <
|
2267 2277 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2268 2278 | as ::aws_smithy_http_server::plugin::Plugin<
|
2269 2279 | RestJson<L>,
|
2270 - | crate::operation_shape::HttpChecksumRequired,
|
2280 + | crate::operation_shape::FractionalSeconds,
|
2271 2281 | ModelPl::Output
|
2272 2282 | >
|
2273 2283 | >::Output
|
2274 2284 | >,
|
2275 2285 |
|
2276 2286 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2277 2287 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
2278 2288 |
|
2279 2289 | {
|
2280 2290 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
2281 2291 | use ::aws_smithy_http_server::plugin::Plugin;
|
2282 - | let svc = crate::operation_shape::HttpChecksumRequired::from_handler(handler);
|
2292 + | let svc = crate::operation_shape::FractionalSeconds::from_handler(handler);
|
2283 2293 | let svc = self.model_plugin.apply(svc);
|
2284 2294 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2285 2295 | .apply(svc);
|
2286 2296 | let svc = self.http_plugin.apply(svc);
|
2287 - | self.http_checksum_required_custom(svc)
|
2297 + | self.fractional_seconds_custom(svc)
|
2288 2298 | }
|
2289 2299 |
|
2290 - | /// Sets the [`HttpChecksumRequired`](crate::operation_shape::HttpChecksumRequired) operation.
|
2300 + | /// Sets the [`FractionalSeconds`](crate::operation_shape::FractionalSeconds) operation.
|
2291 2301 | ///
|
2292 2302 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
2293 2303 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
2294 2304 | ///
|
2295 2305 | /// # Example
|
2296 2306 | ///
|
2297 2307 | /// ```no_run
|
2298 2308 | /// use rest_json::{RestJson, RestJsonConfig};
|
2299 2309 | ///
|
2300 2310 | /// use rest_json::{input, output, error};
|
2301 2311 | ///
|
2302 - | /// async fn handler(input: input::HttpChecksumRequiredInput) -> Result<output::HttpChecksumRequiredOutput, std::convert::Infallible> {
|
2312 + | /// async fn handler(input: input::FractionalSecondsInput) -> Result<output::FractionalSecondsOutput, std::convert::Infallible> {
|
2303 2313 | /// todo!()
|
2304 2314 | /// }
|
2305 2315 | ///
|
2306 2316 | /// let config = RestJsonConfig::builder().build();
|
2307 2317 | /// let svc = ::tower::util::service_fn(handler);
|
2308 2318 | /// let app = RestJson::builder(config)
|
2309 - | /// .http_checksum_required_service(svc)
|
2319 + | /// .fractional_seconds_service(svc)
|
2310 2320 | /// /* Set other handlers */
|
2311 2321 | /// .build()
|
2312 2322 | /// .unwrap();
|
2313 2323 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2314 2324 | /// ```
|
2315 2325 | ///
|
2316 - | pub fn http_checksum_required_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2326 + | pub fn fractional_seconds_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2317 2327 | where
|
2318 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpChecksumRequired, ServiceExtractors>,
|
2328 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::FractionalSeconds, ServiceExtractors>,
|
2319 2329 |
|
2320 2330 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
2321 2331 | RestJson<L>,
|
2322 - | crate::operation_shape::HttpChecksumRequired,
|
2323 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpChecksumRequired, S>
|
2332 + | crate::operation_shape::FractionalSeconds,
|
2333 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::FractionalSeconds, S>
|
2324 2334 | >,
|
2325 2335 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
2326 2336 | RestJson<L>,
|
2327 - | crate::operation_shape::HttpChecksumRequired,
|
2337 + | crate::operation_shape::FractionalSeconds,
|
2328 2338 | ModelPl::Output
|
2329 2339 | >,
|
2330 2340 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
2331 2341 | RestJson<L>,
|
2332 - | crate::operation_shape::HttpChecksumRequired,
|
2342 + | crate::operation_shape::FractionalSeconds,
|
2333 2343 | <
|
2334 2344 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2335 2345 | as ::aws_smithy_http_server::plugin::Plugin<
|
2336 2346 | RestJson<L>,
|
2337 - | crate::operation_shape::HttpChecksumRequired,
|
2347 + | crate::operation_shape::FractionalSeconds,
|
2338 2348 | ModelPl::Output
|
2339 2349 | >
|
2340 2350 | >::Output
|
2341 2351 | >,
|
2342 2352 |
|
2343 2353 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2344 2354 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
2345 2355 |
|
2346 2356 | {
|
2347 2357 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
2348 2358 | use ::aws_smithy_http_server::plugin::Plugin;
|
2349 - | let svc = crate::operation_shape::HttpChecksumRequired::from_service(service);
|
2359 + | let svc = crate::operation_shape::FractionalSeconds::from_service(service);
|
2350 2360 | let svc = self.model_plugin.apply(svc);
|
2351 2361 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2352 2362 | .apply(svc);
|
2353 2363 | let svc = self.http_plugin.apply(svc);
|
2354 - | self.http_checksum_required_custom(svc)
|
2364 + | self.fractional_seconds_custom(svc)
|
2355 2365 | }
|
2356 2366 |
|
2357 - | /// Sets the [`HttpChecksumRequired`](crate::operation_shape::HttpChecksumRequired) to a custom [`Service`](tower::Service).
|
2367 + | /// Sets the [`FractionalSeconds`](crate::operation_shape::FractionalSeconds) to a custom [`Service`](tower::Service).
|
2358 2368 | /// not constrained by the Smithy contract.
|
2359 - | fn http_checksum_required_custom<S>(mut self, svc: S) -> Self
|
2369 + | fn fractional_seconds_custom<S>(mut self, svc: S) -> Self
|
2360 2370 | where
|
2361 2371 | S: ::tower::Service<
|
2362 2372 | ::http_1x::Request<Body>,
|
2363 2373 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
2364 2374 | Error = ::std::convert::Infallible,
|
2365 2375 | > + Clone
|
2366 2376 | + Send
|
2367 2377 | + 'static,
|
2368 2378 | S::Future: Send + 'static,
|
2369 2379 | {
|
2370 - | self.http_checksum_required = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
2380 + | self.fractional_seconds = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
2371 2381 | self
|
2372 2382 | }
|
2373 2383 |
|
2374 - | /// Sets the [`HttpEmptyPrefixHeaders`](crate::operation_shape::HttpEmptyPrefixHeaders) operation.
|
2384 + | /// Sets the [`GreetingWithErrors`](crate::operation_shape::GreetingWithErrors) operation.
|
2375 2385 | ///
|
2376 2386 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
2377 2387 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
2378 2388 | ///
|
2379 2389 | /// # Example
|
2380 2390 | ///
|
2381 2391 | /// ```no_run
|
2382 2392 | /// use rest_json::{RestJson, RestJsonConfig};
|
2383 2393 | ///
|
2384 2394 | /// use rest_json::{input, output, error};
|
2385 2395 | ///
|
2386 - | /// async fn handler(input: input::HttpEmptyPrefixHeadersInput) -> output::HttpEmptyPrefixHeadersOutput {
|
2396 + | /// async fn handler(input: input::GreetingWithErrorsInput) -> Result<output::GreetingWithErrorsOutput, error::GreetingWithErrorsError> {
|
2387 2397 | /// todo!()
|
2388 2398 | /// }
|
2389 2399 | ///
|
2390 2400 | /// let config = RestJsonConfig::builder().build();
|
2391 2401 | /// let app = RestJson::builder(config)
|
2392 - | /// .http_empty_prefix_headers(handler)
|
2402 + | /// .greeting_with_errors(handler)
|
2393 2403 | /// /* Set other handlers */
|
2394 2404 | /// .build()
|
2395 2405 | /// .unwrap();
|
2396 2406 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2397 2407 | /// ```
|
2398 2408 | ///
|
2399 - | pub fn http_empty_prefix_headers<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2409 + | pub fn greeting_with_errors<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2400 2410 | where
|
2401 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpEmptyPrefixHeaders, HandlerExtractors>,
|
2411 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::GreetingWithErrors, HandlerExtractors>,
|
2402 2412 |
|
2403 2413 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
2404 2414 | RestJson<L>,
|
2405 - | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2406 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpEmptyPrefixHeaders, HandlerType>
|
2415 + | crate::operation_shape::GreetingWithErrors,
|
2416 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::GreetingWithErrors, HandlerType>
|
2407 2417 | >,
|
2408 2418 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
2409 2419 | RestJson<L>,
|
2410 - | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2420 + | crate::operation_shape::GreetingWithErrors,
|
2411 2421 | ModelPl::Output
|
2412 2422 | >,
|
2413 2423 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
2414 2424 | RestJson<L>,
|
2415 - | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2425 + | crate::operation_shape::GreetingWithErrors,
|
2416 2426 | <
|
2417 2427 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2418 2428 | as ::aws_smithy_http_server::plugin::Plugin<
|
2419 2429 | RestJson<L>,
|
2420 - | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2430 + | crate::operation_shape::GreetingWithErrors,
|
2421 2431 | ModelPl::Output
|
2422 2432 | >
|
2423 2433 | >::Output
|
2424 2434 | >,
|
2425 2435 |
|
2426 2436 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2427 2437 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
2428 2438 |
|
2429 2439 | {
|
2430 2440 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
2431 2441 | use ::aws_smithy_http_server::plugin::Plugin;
|
2432 - | let svc = crate::operation_shape::HttpEmptyPrefixHeaders::from_handler(handler);
|
2442 + | let svc = crate::operation_shape::GreetingWithErrors::from_handler(handler);
|
2433 2443 | let svc = self.model_plugin.apply(svc);
|
2434 2444 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2435 2445 | .apply(svc);
|
2436 2446 | let svc = self.http_plugin.apply(svc);
|
2437 - | self.http_empty_prefix_headers_custom(svc)
|
2447 + | self.greeting_with_errors_custom(svc)
|
2438 2448 | }
|
2439 2449 |
|
2440 - | /// Sets the [`HttpEmptyPrefixHeaders`](crate::operation_shape::HttpEmptyPrefixHeaders) operation.
|
2450 + | /// Sets the [`GreetingWithErrors`](crate::operation_shape::GreetingWithErrors) operation.
|
2441 2451 | ///
|
2442 2452 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
2443 2453 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
2444 2454 | ///
|
2445 2455 | /// # Example
|
2446 2456 | ///
|
2447 2457 | /// ```no_run
|
2448 2458 | /// use rest_json::{RestJson, RestJsonConfig};
|
2449 2459 | ///
|
2450 2460 | /// use rest_json::{input, output, error};
|
2451 2461 | ///
|
2452 - | /// async fn handler(input: input::HttpEmptyPrefixHeadersInput) -> Result<output::HttpEmptyPrefixHeadersOutput, std::convert::Infallible> {
|
2462 + | /// async fn handler(input: input::GreetingWithErrorsInput) -> Result<output::GreetingWithErrorsOutput, error::GreetingWithErrorsError> {
|
2453 2463 | /// todo!()
|
2454 2464 | /// }
|
2455 2465 | ///
|
2456 2466 | /// let config = RestJsonConfig::builder().build();
|
2457 2467 | /// let svc = ::tower::util::service_fn(handler);
|
2458 2468 | /// let app = RestJson::builder(config)
|
2459 - | /// .http_empty_prefix_headers_service(svc)
|
2469 + | /// .greeting_with_errors_service(svc)
|
2460 2470 | /// /* Set other handlers */
|
2461 2471 | /// .build()
|
2462 2472 | /// .unwrap();
|
2463 2473 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2464 2474 | /// ```
|
2465 2475 | ///
|
2466 - | pub fn http_empty_prefix_headers_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2476 + | pub fn greeting_with_errors_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2467 2477 | where
|
2468 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpEmptyPrefixHeaders, ServiceExtractors>,
|
2478 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::GreetingWithErrors, ServiceExtractors>,
|
2469 2479 |
|
2470 2480 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
2471 2481 | RestJson<L>,
|
2472 - | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2473 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpEmptyPrefixHeaders, S>
|
2482 + | crate::operation_shape::GreetingWithErrors,
|
2483 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::GreetingWithErrors, S>
|
2474 2484 | >,
|
2475 2485 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
2476 2486 | RestJson<L>,
|
2477 - | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2487 + | crate::operation_shape::GreetingWithErrors,
|
2478 2488 | ModelPl::Output
|
2479 2489 | >,
|
2480 2490 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
2481 2491 | RestJson<L>,
|
2482 - | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2492 + | crate::operation_shape::GreetingWithErrors,
|
2483 2493 | <
|
2484 2494 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2485 2495 | as ::aws_smithy_http_server::plugin::Plugin<
|
2486 2496 | RestJson<L>,
|
2487 - | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2497 + | crate::operation_shape::GreetingWithErrors,
|
2488 2498 | ModelPl::Output
|
2489 2499 | >
|
2490 2500 | >::Output
|
2491 2501 | >,
|
2492 2502 |
|
2493 2503 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2494 2504 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
2495 2505 |
|
2496 2506 | {
|
2497 2507 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
2498 2508 | use ::aws_smithy_http_server::plugin::Plugin;
|
2499 - | let svc = crate::operation_shape::HttpEmptyPrefixHeaders::from_service(service);
|
2509 + | let svc = crate::operation_shape::GreetingWithErrors::from_service(service);
|
2500 2510 | let svc = self.model_plugin.apply(svc);
|
2501 2511 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2502 2512 | .apply(svc);
|
2503 2513 | let svc = self.http_plugin.apply(svc);
|
2504 - | self.http_empty_prefix_headers_custom(svc)
|
2514 + | self.greeting_with_errors_custom(svc)
|
2505 2515 | }
|
2506 2516 |
|
2507 - | /// Sets the [`HttpEmptyPrefixHeaders`](crate::operation_shape::HttpEmptyPrefixHeaders) to a custom [`Service`](tower::Service).
|
2517 + | /// Sets the [`GreetingWithErrors`](crate::operation_shape::GreetingWithErrors) to a custom [`Service`](tower::Service).
|
2508 2518 | /// not constrained by the Smithy contract.
|
2509 - | fn http_empty_prefix_headers_custom<S>(mut self, svc: S) -> Self
|
2519 + | fn greeting_with_errors_custom<S>(mut self, svc: S) -> Self
|
2510 2520 | where
|
2511 2521 | S: ::tower::Service<
|
2512 2522 | ::http_1x::Request<Body>,
|
2513 2523 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
2514 2524 | Error = ::std::convert::Infallible,
|
2515 2525 | > + Clone
|
2516 2526 | + Send
|
2517 2527 | + 'static,
|
2518 2528 | S::Future: Send + 'static,
|
2519 2529 | {
|
2520 - | self.http_empty_prefix_headers = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
2530 + | self.greeting_with_errors = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
2521 2531 | self
|
2522 2532 | }
|
2523 2533 |
|
2524 - | /// Sets the [`HttpEnumPayload`](crate::operation_shape::HttpEnumPayload) operation.
|
2534 + | /// Sets the [`HostWithPathOperation`](crate::operation_shape::HostWithPathOperation) operation.
|
2525 2535 | ///
|
2526 2536 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
2527 2537 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
2528 2538 | ///
|
2529 2539 | /// # Example
|
2530 2540 | ///
|
2531 2541 | /// ```no_run
|
2532 2542 | /// use rest_json::{RestJson, RestJsonConfig};
|
2533 2543 | ///
|
2534 2544 | /// use rest_json::{input, output, error};
|
2535 2545 | ///
|
2536 - | /// async fn handler(input: input::HttpEnumPayloadInput) -> Result<output::HttpEnumPayloadOutput, error::HttpEnumPayloadError> {
|
2546 + | /// async fn handler(input: input::HostWithPathOperationInput) -> output::HostWithPathOperationOutput {
|
2537 2547 | /// todo!()
|
2538 2548 | /// }
|
2539 2549 | ///
|
2540 2550 | /// let config = RestJsonConfig::builder().build();
|
2541 2551 | /// let app = RestJson::builder(config)
|
2542 - | /// .http_enum_payload(handler)
|
2552 + | /// .host_with_path_operation(handler)
|
2543 2553 | /// /* Set other handlers */
|
2544 2554 | /// .build()
|
2545 2555 | /// .unwrap();
|
2546 2556 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2547 2557 | /// ```
|
2548 2558 | ///
|
2549 - | pub fn http_enum_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2559 + | pub fn host_with_path_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2550 2560 | where
|
2551 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpEnumPayload, HandlerExtractors>,
|
2561 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HostWithPathOperation, HandlerExtractors>,
|
2552 2562 |
|
2553 2563 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
2554 2564 | RestJson<L>,
|
2555 - | crate::operation_shape::HttpEnumPayload,
|
2556 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpEnumPayload, HandlerType>
|
2565 + | crate::operation_shape::HostWithPathOperation,
|
2566 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HostWithPathOperation, HandlerType>
|
2557 2567 | >,
|
2558 2568 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
2559 2569 | RestJson<L>,
|
2560 - | crate::operation_shape::HttpEnumPayload,
|
2570 + | crate::operation_shape::HostWithPathOperation,
|
2561 2571 | ModelPl::Output
|
2562 2572 | >,
|
2563 2573 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
2564 2574 | RestJson<L>,
|
2565 - | crate::operation_shape::HttpEnumPayload,
|
2575 + | crate::operation_shape::HostWithPathOperation,
|
2566 2576 | <
|
2567 2577 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2568 2578 | as ::aws_smithy_http_server::plugin::Plugin<
|
2569 2579 | RestJson<L>,
|
2570 - | crate::operation_shape::HttpEnumPayload,
|
2580 + | crate::operation_shape::HostWithPathOperation,
|
2571 2581 | ModelPl::Output
|
2572 2582 | >
|
2573 2583 | >::Output
|
2574 2584 | >,
|
2575 2585 |
|
2576 2586 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2577 2587 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
2578 2588 |
|
2579 2589 | {
|
2580 2590 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
2581 2591 | use ::aws_smithy_http_server::plugin::Plugin;
|
2582 - | let svc = crate::operation_shape::HttpEnumPayload::from_handler(handler);
|
2592 + | let svc = crate::operation_shape::HostWithPathOperation::from_handler(handler);
|
2583 2593 | let svc = self.model_plugin.apply(svc);
|
2584 2594 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2585 2595 | .apply(svc);
|
2586 2596 | let svc = self.http_plugin.apply(svc);
|
2587 - | self.http_enum_payload_custom(svc)
|
2597 + | self.host_with_path_operation_custom(svc)
|
2588 2598 | }
|
2589 2599 |
|
2590 - | /// Sets the [`HttpEnumPayload`](crate::operation_shape::HttpEnumPayload) operation.
|
2600 + | /// Sets the [`HostWithPathOperation`](crate::operation_shape::HostWithPathOperation) operation.
|
2591 2601 | ///
|
2592 2602 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
2593 2603 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
2594 2604 | ///
|
2595 2605 | /// # Example
|
2596 2606 | ///
|
2597 2607 | /// ```no_run
|
2598 2608 | /// use rest_json::{RestJson, RestJsonConfig};
|
2599 2609 | ///
|
2600 2610 | /// use rest_json::{input, output, error};
|
2601 2611 | ///
|
2602 - | /// async fn handler(input: input::HttpEnumPayloadInput) -> Result<output::HttpEnumPayloadOutput, error::HttpEnumPayloadError> {
|
2612 + | /// async fn handler(input: input::HostWithPathOperationInput) -> Result<output::HostWithPathOperationOutput, std::convert::Infallible> {
|
2603 2613 | /// todo!()
|
2604 2614 | /// }
|
2605 2615 | ///
|
2606 2616 | /// let config = RestJsonConfig::builder().build();
|
2607 2617 | /// let svc = ::tower::util::service_fn(handler);
|
2608 2618 | /// let app = RestJson::builder(config)
|
2609 - | /// .http_enum_payload_service(svc)
|
2619 + | /// .host_with_path_operation_service(svc)
|
2610 2620 | /// /* Set other handlers */
|
2611 2621 | /// .build()
|
2612 2622 | /// .unwrap();
|
2613 2623 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2614 2624 | /// ```
|
2615 2625 | ///
|
2616 - | pub fn http_enum_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2626 + | pub fn host_with_path_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2617 2627 | where
|
2618 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpEnumPayload, ServiceExtractors>,
|
2628 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HostWithPathOperation, ServiceExtractors>,
|
2619 2629 |
|
2620 2630 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
2621 2631 | RestJson<L>,
|
2622 - | crate::operation_shape::HttpEnumPayload,
|
2623 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpEnumPayload, S>
|
2632 + | crate::operation_shape::HostWithPathOperation,
|
2633 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HostWithPathOperation, S>
|
2624 2634 | >,
|
2625 2635 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
2626 2636 | RestJson<L>,
|
2627 - | crate::operation_shape::HttpEnumPayload,
|
2637 + | crate::operation_shape::HostWithPathOperation,
|
2628 2638 | ModelPl::Output
|
2629 2639 | >,
|
2630 2640 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
2631 2641 | RestJson<L>,
|
2632 - | crate::operation_shape::HttpEnumPayload,
|
2642 + | crate::operation_shape::HostWithPathOperation,
|
2633 2643 | <
|
2634 2644 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2635 2645 | as ::aws_smithy_http_server::plugin::Plugin<
|
2636 2646 | RestJson<L>,
|
2637 - | crate::operation_shape::HttpEnumPayload,
|
2647 + | crate::operation_shape::HostWithPathOperation,
|
2638 2648 | ModelPl::Output
|
2639 2649 | >
|
2640 2650 | >::Output
|
2641 2651 | >,
|
2642 2652 |
|
2643 2653 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2644 2654 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
2645 2655 |
|
2646 2656 | {
|
2647 2657 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
2648 2658 | use ::aws_smithy_http_server::plugin::Plugin;
|
2649 - | let svc = crate::operation_shape::HttpEnumPayload::from_service(service);
|
2659 + | let svc = crate::operation_shape::HostWithPathOperation::from_service(service);
|
2650 2660 | let svc = self.model_plugin.apply(svc);
|
2651 2661 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2652 2662 | .apply(svc);
|
2653 2663 | let svc = self.http_plugin.apply(svc);
|
2654 - | self.http_enum_payload_custom(svc)
|
2664 + | self.host_with_path_operation_custom(svc)
|
2655 2665 | }
|
2656 2666 |
|
2657 - | /// Sets the [`HttpEnumPayload`](crate::operation_shape::HttpEnumPayload) to a custom [`Service`](tower::Service).
|
2667 + | /// Sets the [`HostWithPathOperation`](crate::operation_shape::HostWithPathOperation) to a custom [`Service`](tower::Service).
|
2658 2668 | /// not constrained by the Smithy contract.
|
2659 - | fn http_enum_payload_custom<S>(mut self, svc: S) -> Self
|
2669 + | fn host_with_path_operation_custom<S>(mut self, svc: S) -> Self
|
2660 2670 | where
|
2661 2671 | S: ::tower::Service<
|
2662 2672 | ::http_1x::Request<Body>,
|
2663 2673 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
2664 2674 | Error = ::std::convert::Infallible,
|
2665 2675 | > + Clone
|
2666 2676 | + Send
|
2667 2677 | + 'static,
|
2668 2678 | S::Future: Send + 'static,
|
2669 2679 | {
|
2670 - | self.http_enum_payload = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
2680 + | self.host_with_path_operation = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
2671 2681 | self
|
2672 2682 | }
|
2673 2683 |
|
2674 - | /// Sets the [`HttpPayloadTraits`](crate::operation_shape::HttpPayloadTraits) operation.
|
2684 + | /// Sets the [`HttpChecksumRequired`](crate::operation_shape::HttpChecksumRequired) operation.
|
2675 2685 | ///
|
2676 2686 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
2677 2687 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
2678 2688 | ///
|
2679 2689 | /// # Example
|
2680 2690 | ///
|
2681 2691 | /// ```no_run
|
2682 2692 | /// use rest_json::{RestJson, RestJsonConfig};
|
2683 2693 | ///
|
2684 2694 | /// use rest_json::{input, output, error};
|
2685 2695 | ///
|
2686 - | /// async fn handler(input: input::HttpPayloadTraitsInput) -> output::HttpPayloadTraitsOutput {
|
2696 + | /// async fn handler(input: input::HttpChecksumRequiredInput) -> output::HttpChecksumRequiredOutput {
|
2687 2697 | /// todo!()
|
2688 2698 | /// }
|
2689 2699 | ///
|
2690 2700 | /// let config = RestJsonConfig::builder().build();
|
2691 2701 | /// let app = RestJson::builder(config)
|
2692 - | /// .http_payload_traits(handler)
|
2702 + | /// .http_checksum_required(handler)
|
2693 2703 | /// /* Set other handlers */
|
2694 2704 | /// .build()
|
2695 2705 | /// .unwrap();
|
2696 2706 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2697 2707 | /// ```
|
2698 2708 | ///
|
2699 - | pub fn http_payload_traits<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2709 + | pub fn http_checksum_required<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2700 2710 | where
|
2701 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpPayloadTraits, HandlerExtractors>,
|
2711 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpChecksumRequired, HandlerExtractors>,
|
2702 2712 |
|
2703 2713 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
2704 2714 | RestJson<L>,
|
2705 - | crate::operation_shape::HttpPayloadTraits,
|
2706 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadTraits, HandlerType>
|
2715 + | crate::operation_shape::HttpChecksumRequired,
|
2716 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpChecksumRequired, HandlerType>
|
2707 2717 | >,
|
2708 2718 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
2709 2719 | RestJson<L>,
|
2710 - | crate::operation_shape::HttpPayloadTraits,
|
2720 + | crate::operation_shape::HttpChecksumRequired,
|
2711 2721 | ModelPl::Output
|
2712 2722 | >,
|
2713 2723 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
2714 2724 | RestJson<L>,
|
2715 - | crate::operation_shape::HttpPayloadTraits,
|
2725 + | crate::operation_shape::HttpChecksumRequired,
|
2716 2726 | <
|
2717 2727 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2718 2728 | as ::aws_smithy_http_server::plugin::Plugin<
|
2719 2729 | RestJson<L>,
|
2720 - | crate::operation_shape::HttpPayloadTraits,
|
2730 + | crate::operation_shape::HttpChecksumRequired,
|
2721 2731 | ModelPl::Output
|
2722 2732 | >
|
2723 2733 | >::Output
|
2724 2734 | >,
|
2725 2735 |
|
2726 2736 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2727 2737 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
2728 2738 |
|
2729 2739 | {
|
2730 2740 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
2731 2741 | use ::aws_smithy_http_server::plugin::Plugin;
|
2732 - | let svc = crate::operation_shape::HttpPayloadTraits::from_handler(handler);
|
2742 + | let svc = crate::operation_shape::HttpChecksumRequired::from_handler(handler);
|
2733 2743 | let svc = self.model_plugin.apply(svc);
|
2734 2744 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2735 2745 | .apply(svc);
|
2736 2746 | let svc = self.http_plugin.apply(svc);
|
2737 - | self.http_payload_traits_custom(svc)
|
2747 + | self.http_checksum_required_custom(svc)
|
2738 2748 | }
|
2739 2749 |
|
2740 - | /// Sets the [`HttpPayloadTraits`](crate::operation_shape::HttpPayloadTraits) operation.
|
2750 + | /// Sets the [`HttpChecksumRequired`](crate::operation_shape::HttpChecksumRequired) operation.
|
2741 2751 | ///
|
2742 2752 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
2743 2753 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
2744 2754 | ///
|
2745 2755 | /// # Example
|
2746 2756 | ///
|
2747 2757 | /// ```no_run
|
2748 2758 | /// use rest_json::{RestJson, RestJsonConfig};
|
2749 2759 | ///
|
2750 2760 | /// use rest_json::{input, output, error};
|
2751 2761 | ///
|
2752 - | /// async fn handler(input: input::HttpPayloadTraitsInput) -> Result<output::HttpPayloadTraitsOutput, std::convert::Infallible> {
|
2762 + | /// async fn handler(input: input::HttpChecksumRequiredInput) -> Result<output::HttpChecksumRequiredOutput, std::convert::Infallible> {
|
2753 2763 | /// todo!()
|
2754 2764 | /// }
|
2755 2765 | ///
|
2756 2766 | /// let config = RestJsonConfig::builder().build();
|
2757 2767 | /// let svc = ::tower::util::service_fn(handler);
|
2758 2768 | /// let app = RestJson::builder(config)
|
2759 - | /// .http_payload_traits_service(svc)
|
2769 + | /// .http_checksum_required_service(svc)
|
2760 2770 | /// /* Set other handlers */
|
2761 2771 | /// .build()
|
2762 2772 | /// .unwrap();
|
2763 2773 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2764 2774 | /// ```
|
2765 2775 | ///
|
2766 - | pub fn http_payload_traits_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2776 + | pub fn http_checksum_required_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2767 2777 | where
|
2768 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadTraits, ServiceExtractors>,
|
2778 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpChecksumRequired, ServiceExtractors>,
|
2769 2779 |
|
2770 2780 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
2771 2781 | RestJson<L>,
|
2772 - | crate::operation_shape::HttpPayloadTraits,
|
2773 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadTraits, S>
|
2782 + | crate::operation_shape::HttpChecksumRequired,
|
2783 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpChecksumRequired, S>
|
2774 2784 | >,
|
2775 2785 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
2776 2786 | RestJson<L>,
|
2777 - | crate::operation_shape::HttpPayloadTraits,
|
2787 + | crate::operation_shape::HttpChecksumRequired,
|
2778 2788 | ModelPl::Output
|
2779 2789 | >,
|
2780 2790 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
2781 2791 | RestJson<L>,
|
2782 - | crate::operation_shape::HttpPayloadTraits,
|
2792 + | crate::operation_shape::HttpChecksumRequired,
|
2783 2793 | <
|
2784 2794 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2785 2795 | as ::aws_smithy_http_server::plugin::Plugin<
|
2786 2796 | RestJson<L>,
|
2787 - | crate::operation_shape::HttpPayloadTraits,
|
2797 + | crate::operation_shape::HttpChecksumRequired,
|
2788 2798 | ModelPl::Output
|
2789 2799 | >
|
2790 2800 | >::Output
|
2791 2801 | >,
|
2792 2802 |
|
2793 2803 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2794 2804 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
2795 2805 |
|
2796 2806 | {
|
2797 2807 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
2798 2808 | use ::aws_smithy_http_server::plugin::Plugin;
|
2799 - | let svc = crate::operation_shape::HttpPayloadTraits::from_service(service);
|
2809 + | let svc = crate::operation_shape::HttpChecksumRequired::from_service(service);
|
2800 2810 | let svc = self.model_plugin.apply(svc);
|
2801 2811 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2802 2812 | .apply(svc);
|
2803 2813 | let svc = self.http_plugin.apply(svc);
|
2804 - | self.http_payload_traits_custom(svc)
|
2814 + | self.http_checksum_required_custom(svc)
|
2805 2815 | }
|
2806 2816 |
|
2807 - | /// Sets the [`HttpPayloadTraits`](crate::operation_shape::HttpPayloadTraits) to a custom [`Service`](tower::Service).
|
2817 + | /// Sets the [`HttpChecksumRequired`](crate::operation_shape::HttpChecksumRequired) to a custom [`Service`](tower::Service).
|
2808 2818 | /// not constrained by the Smithy contract.
|
2809 - | fn http_payload_traits_custom<S>(mut self, svc: S) -> Self
|
2819 + | fn http_checksum_required_custom<S>(mut self, svc: S) -> Self
|
2810 2820 | where
|
2811 2821 | S: ::tower::Service<
|
2812 2822 | ::http_1x::Request<Body>,
|
2813 2823 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
2814 2824 | Error = ::std::convert::Infallible,
|
2815 2825 | > + Clone
|
2816 2826 | + Send
|
2817 2827 | + 'static,
|
2818 2828 | S::Future: Send + 'static,
|
2819 2829 | {
|
2820 - | self.http_payload_traits = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
2830 + | self.http_checksum_required = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
2821 2831 | self
|
2822 2832 | }
|
2823 2833 |
|
2824 - | /// Sets the [`HttpPayloadTraitsWithMediaType`](crate::operation_shape::HttpPayloadTraitsWithMediaType) operation.
|
2834 + | /// Sets the [`HttpEmptyPrefixHeaders`](crate::operation_shape::HttpEmptyPrefixHeaders) operation.
|
2825 2835 | ///
|
2826 2836 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
2827 2837 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
2828 2838 | ///
|
2829 2839 | /// # Example
|
2830 2840 | ///
|
2831 2841 | /// ```no_run
|
2832 2842 | /// use rest_json::{RestJson, RestJsonConfig};
|
2833 2843 | ///
|
2834 2844 | /// use rest_json::{input, output, error};
|
2835 2845 | ///
|
2836 - | /// async fn handler(input: input::HttpPayloadTraitsWithMediaTypeInput) -> output::HttpPayloadTraitsWithMediaTypeOutput {
|
2846 + | /// async fn handler(input: input::HttpEmptyPrefixHeadersInput) -> output::HttpEmptyPrefixHeadersOutput {
|
2837 2847 | /// todo!()
|
2838 2848 | /// }
|
2839 2849 | ///
|
2840 2850 | /// let config = RestJsonConfig::builder().build();
|
2841 2851 | /// let app = RestJson::builder(config)
|
2842 - | /// .http_payload_traits_with_media_type(handler)
|
2852 + | /// .http_empty_prefix_headers(handler)
|
2843 2853 | /// /* Set other handlers */
|
2844 2854 | /// .build()
|
2845 2855 | /// .unwrap();
|
2846 2856 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2847 2857 | /// ```
|
2848 2858 | ///
|
2849 - | pub fn http_payload_traits_with_media_type<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2859 + | pub fn http_empty_prefix_headers<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
2850 2860 | where
|
2851 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpPayloadTraitsWithMediaType, HandlerExtractors>,
|
2861 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpEmptyPrefixHeaders, HandlerExtractors>,
|
2852 2862 |
|
2853 2863 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
2854 2864 | RestJson<L>,
|
2855 - | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
2856 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadTraitsWithMediaType, HandlerType>
|
2865 + | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2866 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpEmptyPrefixHeaders, HandlerType>
|
2857 2867 | >,
|
2858 2868 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
2859 2869 | RestJson<L>,
|
2860 - | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
2870 + | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2861 2871 | ModelPl::Output
|
2862 2872 | >,
|
2863 2873 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
2864 2874 | RestJson<L>,
|
2865 - | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
2875 + | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2866 2876 | <
|
2867 2877 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2868 2878 | as ::aws_smithy_http_server::plugin::Plugin<
|
2869 2879 | RestJson<L>,
|
2870 - | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
2880 + | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2871 2881 | ModelPl::Output
|
2872 2882 | >
|
2873 2883 | >::Output
|
2874 2884 | >,
|
2875 2885 |
|
2876 2886 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2877 2887 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
2878 2888 |
|
2879 2889 | {
|
2880 2890 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
2881 2891 | use ::aws_smithy_http_server::plugin::Plugin;
|
2882 - | let svc = crate::operation_shape::HttpPayloadTraitsWithMediaType::from_handler(handler);
|
2892 + | let svc = crate::operation_shape::HttpEmptyPrefixHeaders::from_handler(handler);
|
2883 2893 | let svc = self.model_plugin.apply(svc);
|
2884 2894 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2885 2895 | .apply(svc);
|
2886 2896 | let svc = self.http_plugin.apply(svc);
|
2887 - | self.http_payload_traits_with_media_type_custom(svc)
|
2897 + | self.http_empty_prefix_headers_custom(svc)
|
2888 2898 | }
|
2889 2899 |
|
2890 - | /// Sets the [`HttpPayloadTraitsWithMediaType`](crate::operation_shape::HttpPayloadTraitsWithMediaType) operation.
|
2900 + | /// Sets the [`HttpEmptyPrefixHeaders`](crate::operation_shape::HttpEmptyPrefixHeaders) operation.
|
2891 2901 | ///
|
2892 2902 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
2893 2903 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
2894 2904 | ///
|
2895 2905 | /// # Example
|
2896 2906 | ///
|
2897 2907 | /// ```no_run
|
2898 2908 | /// use rest_json::{RestJson, RestJsonConfig};
|
2899 2909 | ///
|
2900 2910 | /// use rest_json::{input, output, error};
|
2901 2911 | ///
|
2902 - | /// async fn handler(input: input::HttpPayloadTraitsWithMediaTypeInput) -> Result<output::HttpPayloadTraitsWithMediaTypeOutput, std::convert::Infallible> {
|
2912 + | /// async fn handler(input: input::HttpEmptyPrefixHeadersInput) -> Result<output::HttpEmptyPrefixHeadersOutput, std::convert::Infallible> {
|
2903 2913 | /// todo!()
|
2904 2914 | /// }
|
2905 2915 | ///
|
2906 2916 | /// let config = RestJsonConfig::builder().build();
|
2907 2917 | /// let svc = ::tower::util::service_fn(handler);
|
2908 2918 | /// let app = RestJson::builder(config)
|
2909 - | /// .http_payload_traits_with_media_type_service(svc)
|
2919 + | /// .http_empty_prefix_headers_service(svc)
|
2910 2920 | /// /* Set other handlers */
|
2911 2921 | /// .build()
|
2912 2922 | /// .unwrap();
|
2913 2923 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2914 2924 | /// ```
|
2915 2925 | ///
|
2916 - | pub fn http_payload_traits_with_media_type_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2926 + | pub fn http_empty_prefix_headers_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
2917 2927 | where
|
2918 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadTraitsWithMediaType, ServiceExtractors>,
|
2928 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpEmptyPrefixHeaders, ServiceExtractors>,
|
2919 2929 |
|
2920 2930 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
2921 2931 | RestJson<L>,
|
2922 - | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
2923 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadTraitsWithMediaType, S>
|
2932 + | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2933 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpEmptyPrefixHeaders, S>
|
2924 2934 | >,
|
2925 2935 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
2926 2936 | RestJson<L>,
|
2927 - | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
2937 + | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2928 2938 | ModelPl::Output
|
2929 2939 | >,
|
2930 2940 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
2931 2941 | RestJson<L>,
|
2932 - | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
2942 + | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2933 2943 | <
|
2934 2944 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
2935 2945 | as ::aws_smithy_http_server::plugin::Plugin<
|
2936 2946 | RestJson<L>,
|
2937 - | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
2947 + | crate::operation_shape::HttpEmptyPrefixHeaders,
|
2938 2948 | ModelPl::Output
|
2939 2949 | >
|
2940 2950 | >::Output
|
2941 2951 | >,
|
2942 2952 |
|
2943 2953 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
2944 2954 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
2945 2955 |
|
2946 2956 | {
|
2947 2957 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
2948 2958 | use ::aws_smithy_http_server::plugin::Plugin;
|
2949 - | let svc = crate::operation_shape::HttpPayloadTraitsWithMediaType::from_service(service);
|
2959 + | let svc = crate::operation_shape::HttpEmptyPrefixHeaders::from_service(service);
|
2950 2960 | let svc = self.model_plugin.apply(svc);
|
2951 2961 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
2952 2962 | .apply(svc);
|
2953 2963 | let svc = self.http_plugin.apply(svc);
|
2954 - | self.http_payload_traits_with_media_type_custom(svc)
|
2964 + | self.http_empty_prefix_headers_custom(svc)
|
2955 2965 | }
|
2956 2966 |
|
2957 - | /// Sets the [`HttpPayloadTraitsWithMediaType`](crate::operation_shape::HttpPayloadTraitsWithMediaType) to a custom [`Service`](tower::Service).
|
2967 + | /// Sets the [`HttpEmptyPrefixHeaders`](crate::operation_shape::HttpEmptyPrefixHeaders) to a custom [`Service`](tower::Service).
|
2958 2968 | /// not constrained by the Smithy contract.
|
2959 - | fn http_payload_traits_with_media_type_custom<S>(mut self, svc: S) -> Self
|
2969 + | fn http_empty_prefix_headers_custom<S>(mut self, svc: S) -> Self
|
2960 2970 | where
|
2961 2971 | S: ::tower::Service<
|
2962 2972 | ::http_1x::Request<Body>,
|
2963 2973 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
2964 2974 | Error = ::std::convert::Infallible,
|
2965 2975 | > + Clone
|
2966 2976 | + Send
|
2967 2977 | + 'static,
|
2968 2978 | S::Future: Send + 'static,
|
2969 2979 | {
|
2970 - | self.http_payload_traits_with_media_type =
|
2971 - | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
2980 + | self.http_empty_prefix_headers = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
2972 2981 | self
|
2973 2982 | }
|
2974 2983 |
|
2975 - | /// Sets the [`HttpPayloadWithStructure`](crate::operation_shape::HttpPayloadWithStructure) operation.
|
2984 + | /// Sets the [`HttpEnumPayload`](crate::operation_shape::HttpEnumPayload) operation.
|
2976 2985 | ///
|
2977 2986 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
2978 2987 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
2979 2988 | ///
|
2980 2989 | /// # Example
|
2981 2990 | ///
|
2982 2991 | /// ```no_run
|
2983 2992 | /// use rest_json::{RestJson, RestJsonConfig};
|
2984 2993 | ///
|
2985 2994 | /// use rest_json::{input, output, error};
|
2986 2995 | ///
|
2987 - | /// async fn handler(input: input::HttpPayloadWithStructureInput) -> output::HttpPayloadWithStructureOutput {
|
2996 + | /// async fn handler(input: input::HttpEnumPayloadInput) -> Result<output::HttpEnumPayloadOutput, error::HttpEnumPayloadError> {
|
2988 2997 | /// todo!()
|
2989 2998 | /// }
|
2990 2999 | ///
|
2991 3000 | /// let config = RestJsonConfig::builder().build();
|
2992 3001 | /// let app = RestJson::builder(config)
|
2993 - | /// .http_payload_with_structure(handler)
|
3002 + | /// .http_enum_payload(handler)
|
2994 3003 | /// /* Set other handlers */
|
2995 3004 | /// .build()
|
2996 3005 | /// .unwrap();
|
2997 3006 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
2998 3007 | /// ```
|
2999 3008 | ///
|
3000 - | pub fn http_payload_with_structure<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3009 + | pub fn http_enum_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3001 3010 | where
|
3002 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpPayloadWithStructure, HandlerExtractors>,
|
3011 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpEnumPayload, HandlerExtractors>,
|
3003 3012 |
|
3004 3013 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
3005 3014 | RestJson<L>,
|
3006 - | crate::operation_shape::HttpPayloadWithStructure,
|
3007 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadWithStructure, HandlerType>
|
3015 + | crate::operation_shape::HttpEnumPayload,
|
3016 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpEnumPayload, HandlerType>
|
3008 3017 | >,
|
3009 3018 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
3010 3019 | RestJson<L>,
|
3011 - | crate::operation_shape::HttpPayloadWithStructure,
|
3020 + | crate::operation_shape::HttpEnumPayload,
|
3012 3021 | ModelPl::Output
|
3013 3022 | >,
|
3014 3023 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
3015 3024 | RestJson<L>,
|
3016 - | crate::operation_shape::HttpPayloadWithStructure,
|
3025 + | crate::operation_shape::HttpEnumPayload,
|
3017 3026 | <
|
3018 3027 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3019 3028 | as ::aws_smithy_http_server::plugin::Plugin<
|
3020 3029 | RestJson<L>,
|
3021 - | crate::operation_shape::HttpPayloadWithStructure,
|
3030 + | crate::operation_shape::HttpEnumPayload,
|
3022 3031 | ModelPl::Output
|
3023 3032 | >
|
3024 3033 | >::Output
|
3025 3034 | >,
|
3026 3035 |
|
3027 3036 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3028 3037 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
3029 3038 |
|
3030 3039 | {
|
3031 3040 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
3032 3041 | use ::aws_smithy_http_server::plugin::Plugin;
|
3033 - | let svc = crate::operation_shape::HttpPayloadWithStructure::from_handler(handler);
|
3042 + | let svc = crate::operation_shape::HttpEnumPayload::from_handler(handler);
|
3034 3043 | let svc = self.model_plugin.apply(svc);
|
3035 3044 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3036 3045 | .apply(svc);
|
3037 3046 | let svc = self.http_plugin.apply(svc);
|
3038 - | self.http_payload_with_structure_custom(svc)
|
3047 + | self.http_enum_payload_custom(svc)
|
3039 3048 | }
|
3040 3049 |
|
3041 - | /// Sets the [`HttpPayloadWithStructure`](crate::operation_shape::HttpPayloadWithStructure) operation.
|
3050 + | /// Sets the [`HttpEnumPayload`](crate::operation_shape::HttpEnumPayload) operation.
|
3042 3051 | ///
|
3043 3052 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
3044 3053 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
3045 3054 | ///
|
3046 3055 | /// # Example
|
3047 3056 | ///
|
3048 3057 | /// ```no_run
|
3049 3058 | /// use rest_json::{RestJson, RestJsonConfig};
|
3050 3059 | ///
|
3051 3060 | /// use rest_json::{input, output, error};
|
3052 3061 | ///
|
3053 - | /// async fn handler(input: input::HttpPayloadWithStructureInput) -> Result<output::HttpPayloadWithStructureOutput, std::convert::Infallible> {
|
3062 + | /// async fn handler(input: input::HttpEnumPayloadInput) -> Result<output::HttpEnumPayloadOutput, error::HttpEnumPayloadError> {
|
3054 3063 | /// todo!()
|
3055 3064 | /// }
|
3056 3065 | ///
|
3057 3066 | /// let config = RestJsonConfig::builder().build();
|
3058 3067 | /// let svc = ::tower::util::service_fn(handler);
|
3059 3068 | /// let app = RestJson::builder(config)
|
3060 - | /// .http_payload_with_structure_service(svc)
|
3069 + | /// .http_enum_payload_service(svc)
|
3061 3070 | /// /* Set other handlers */
|
3062 3071 | /// .build()
|
3063 3072 | /// .unwrap();
|
3064 3073 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3065 3074 | /// ```
|
3066 3075 | ///
|
3067 - | pub fn http_payload_with_structure_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3076 + | pub fn http_enum_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3068 3077 | where
|
3069 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadWithStructure, ServiceExtractors>,
|
3078 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpEnumPayload, ServiceExtractors>,
|
3070 3079 |
|
3071 3080 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
3072 3081 | RestJson<L>,
|
3073 - | crate::operation_shape::HttpPayloadWithStructure,
|
3074 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadWithStructure, S>
|
3082 + | crate::operation_shape::HttpEnumPayload,
|
3083 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpEnumPayload, S>
|
3075 3084 | >,
|
3076 3085 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
3077 3086 | RestJson<L>,
|
3078 - | crate::operation_shape::HttpPayloadWithStructure,
|
3087 + | crate::operation_shape::HttpEnumPayload,
|
3079 3088 | ModelPl::Output
|
3080 3089 | >,
|
3081 3090 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
3082 3091 | RestJson<L>,
|
3083 - | crate::operation_shape::HttpPayloadWithStructure,
|
3092 + | crate::operation_shape::HttpEnumPayload,
|
3084 3093 | <
|
3085 3094 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3086 3095 | as ::aws_smithy_http_server::plugin::Plugin<
|
3087 3096 | RestJson<L>,
|
3088 - | crate::operation_shape::HttpPayloadWithStructure,
|
3097 + | crate::operation_shape::HttpEnumPayload,
|
3089 3098 | ModelPl::Output
|
3090 3099 | >
|
3091 3100 | >::Output
|
3092 3101 | >,
|
3093 3102 |
|
3094 3103 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3095 3104 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
3096 3105 |
|
3097 3106 | {
|
3098 3107 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
3099 3108 | use ::aws_smithy_http_server::plugin::Plugin;
|
3100 - | let svc = crate::operation_shape::HttpPayloadWithStructure::from_service(service);
|
3109 + | let svc = crate::operation_shape::HttpEnumPayload::from_service(service);
|
3101 3110 | let svc = self.model_plugin.apply(svc);
|
3102 3111 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3103 3112 | .apply(svc);
|
3104 3113 | let svc = self.http_plugin.apply(svc);
|
3105 - | self.http_payload_with_structure_custom(svc)
|
3114 + | self.http_enum_payload_custom(svc)
|
3106 3115 | }
|
3107 3116 |
|
3108 - | /// Sets the [`HttpPayloadWithStructure`](crate::operation_shape::HttpPayloadWithStructure) to a custom [`Service`](tower::Service).
|
3117 + | /// Sets the [`HttpEnumPayload`](crate::operation_shape::HttpEnumPayload) to a custom [`Service`](tower::Service).
|
3109 3118 | /// not constrained by the Smithy contract.
|
3110 - | fn http_payload_with_structure_custom<S>(mut self, svc: S) -> Self
|
3119 + | fn http_enum_payload_custom<S>(mut self, svc: S) -> Self
|
3111 3120 | where
|
3112 3121 | S: ::tower::Service<
|
3113 3122 | ::http_1x::Request<Body>,
|
3114 3123 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
3115 3124 | Error = ::std::convert::Infallible,
|
3116 3125 | > + Clone
|
3117 3126 | + Send
|
3118 3127 | + 'static,
|
3119 3128 | S::Future: Send + 'static,
|
3120 3129 | {
|
3121 - | self.http_payload_with_structure = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
3130 + | self.http_enum_payload = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
3122 3131 | self
|
3123 3132 | }
|
3124 3133 |
|
3125 - | /// Sets the [`HttpPayloadWithUnion`](crate::operation_shape::HttpPayloadWithUnion) operation.
|
3134 + | /// Sets the [`HttpPayloadTraits`](crate::operation_shape::HttpPayloadTraits) operation.
|
3126 3135 | ///
|
3127 3136 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
3128 3137 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
3129 3138 | ///
|
3130 3139 | /// # Example
|
3131 3140 | ///
|
3132 3141 | /// ```no_run
|
3133 3142 | /// use rest_json::{RestJson, RestJsonConfig};
|
3134 3143 | ///
|
3135 3144 | /// use rest_json::{input, output, error};
|
3136 3145 | ///
|
3137 - | /// async fn handler(input: input::HttpPayloadWithUnionInput) -> output::HttpPayloadWithUnionOutput {
|
3146 + | /// async fn handler(input: input::HttpPayloadTraitsInput) -> output::HttpPayloadTraitsOutput {
|
3138 3147 | /// todo!()
|
3139 3148 | /// }
|
3140 3149 | ///
|
3141 3150 | /// let config = RestJsonConfig::builder().build();
|
3142 3151 | /// let app = RestJson::builder(config)
|
3143 - | /// .http_payload_with_union(handler)
|
3152 + | /// .http_payload_traits(handler)
|
3144 3153 | /// /* Set other handlers */
|
3145 3154 | /// .build()
|
3146 3155 | /// .unwrap();
|
3147 3156 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3148 3157 | /// ```
|
3149 3158 | ///
|
3150 - | pub fn http_payload_with_union<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3159 + | pub fn http_payload_traits<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3151 3160 | where
|
3152 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpPayloadWithUnion, HandlerExtractors>,
|
3161 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpPayloadTraits, HandlerExtractors>,
|
3153 3162 |
|
3154 3163 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
3155 3164 | RestJson<L>,
|
3156 - | crate::operation_shape::HttpPayloadWithUnion,
|
3157 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadWithUnion, HandlerType>
|
3165 + | crate::operation_shape::HttpPayloadTraits,
|
3166 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadTraits, HandlerType>
|
3158 3167 | >,
|
3159 3168 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
3160 3169 | RestJson<L>,
|
3161 - | crate::operation_shape::HttpPayloadWithUnion,
|
3170 + | crate::operation_shape::HttpPayloadTraits,
|
3162 3171 | ModelPl::Output
|
3163 3172 | >,
|
3164 3173 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
3165 3174 | RestJson<L>,
|
3166 - | crate::operation_shape::HttpPayloadWithUnion,
|
3175 + | crate::operation_shape::HttpPayloadTraits,
|
3167 3176 | <
|
3168 3177 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3169 3178 | as ::aws_smithy_http_server::plugin::Plugin<
|
3170 3179 | RestJson<L>,
|
3171 - | crate::operation_shape::HttpPayloadWithUnion,
|
3180 + | crate::operation_shape::HttpPayloadTraits,
|
3172 3181 | ModelPl::Output
|
3173 3182 | >
|
3174 3183 | >::Output
|
3175 3184 | >,
|
3176 3185 |
|
3177 3186 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3178 3187 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
3179 3188 |
|
3180 3189 | {
|
3181 3190 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
3182 3191 | use ::aws_smithy_http_server::plugin::Plugin;
|
3183 - | let svc = crate::operation_shape::HttpPayloadWithUnion::from_handler(handler);
|
3192 + | let svc = crate::operation_shape::HttpPayloadTraits::from_handler(handler);
|
3184 3193 | let svc = self.model_plugin.apply(svc);
|
3185 3194 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3186 3195 | .apply(svc);
|
3187 3196 | let svc = self.http_plugin.apply(svc);
|
3188 - | self.http_payload_with_union_custom(svc)
|
3197 + | self.http_payload_traits_custom(svc)
|
3189 3198 | }
|
3190 3199 |
|
3191 - | /// Sets the [`HttpPayloadWithUnion`](crate::operation_shape::HttpPayloadWithUnion) operation.
|
3200 + | /// Sets the [`HttpPayloadTraits`](crate::operation_shape::HttpPayloadTraits) operation.
|
3192 3201 | ///
|
3193 3202 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
3194 3203 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
3195 3204 | ///
|
3196 3205 | /// # Example
|
3197 3206 | ///
|
3198 3207 | /// ```no_run
|
3199 3208 | /// use rest_json::{RestJson, RestJsonConfig};
|
3200 3209 | ///
|
3201 3210 | /// use rest_json::{input, output, error};
|
3202 3211 | ///
|
3203 - | /// async fn handler(input: input::HttpPayloadWithUnionInput) -> Result<output::HttpPayloadWithUnionOutput, std::convert::Infallible> {
|
3212 + | /// async fn handler(input: input::HttpPayloadTraitsInput) -> Result<output::HttpPayloadTraitsOutput, std::convert::Infallible> {
|
3204 3213 | /// todo!()
|
3205 3214 | /// }
|
3206 3215 | ///
|
3207 3216 | /// let config = RestJsonConfig::builder().build();
|
3208 3217 | /// let svc = ::tower::util::service_fn(handler);
|
3209 3218 | /// let app = RestJson::builder(config)
|
3210 - | /// .http_payload_with_union_service(svc)
|
3219 + | /// .http_payload_traits_service(svc)
|
3211 3220 | /// /* Set other handlers */
|
3212 3221 | /// .build()
|
3213 3222 | /// .unwrap();
|
3214 3223 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3215 3224 | /// ```
|
3216 3225 | ///
|
3217 - | pub fn http_payload_with_union_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3226 + | pub fn http_payload_traits_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3218 3227 | where
|
3219 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadWithUnion, ServiceExtractors>,
|
3228 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadTraits, ServiceExtractors>,
|
3220 3229 |
|
3221 3230 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
3222 3231 | RestJson<L>,
|
3223 - | crate::operation_shape::HttpPayloadWithUnion,
|
3224 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadWithUnion, S>
|
3232 + | crate::operation_shape::HttpPayloadTraits,
|
3233 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadTraits, S>
|
3225 3234 | >,
|
3226 3235 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
3227 3236 | RestJson<L>,
|
3228 - | crate::operation_shape::HttpPayloadWithUnion,
|
3237 + | crate::operation_shape::HttpPayloadTraits,
|
3229 3238 | ModelPl::Output
|
3230 3239 | >,
|
3231 3240 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
3232 3241 | RestJson<L>,
|
3233 - | crate::operation_shape::HttpPayloadWithUnion,
|
3242 + | crate::operation_shape::HttpPayloadTraits,
|
3234 3243 | <
|
3235 3244 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3236 3245 | as ::aws_smithy_http_server::plugin::Plugin<
|
3237 3246 | RestJson<L>,
|
3238 - | crate::operation_shape::HttpPayloadWithUnion,
|
3247 + | crate::operation_shape::HttpPayloadTraits,
|
3239 3248 | ModelPl::Output
|
3240 3249 | >
|
3241 3250 | >::Output
|
3242 3251 | >,
|
3243 3252 |
|
3244 3253 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3245 3254 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
3246 3255 |
|
3247 3256 | {
|
3248 3257 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
3249 3258 | use ::aws_smithy_http_server::plugin::Plugin;
|
3250 - | let svc = crate::operation_shape::HttpPayloadWithUnion::from_service(service);
|
3259 + | let svc = crate::operation_shape::HttpPayloadTraits::from_service(service);
|
3251 3260 | let svc = self.model_plugin.apply(svc);
|
3252 3261 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3253 3262 | .apply(svc);
|
3254 3263 | let svc = self.http_plugin.apply(svc);
|
3255 - | self.http_payload_with_union_custom(svc)
|
3264 + | self.http_payload_traits_custom(svc)
|
3256 3265 | }
|
3257 3266 |
|
3258 - | /// Sets the [`HttpPayloadWithUnion`](crate::operation_shape::HttpPayloadWithUnion) to a custom [`Service`](tower::Service).
|
3267 + | /// Sets the [`HttpPayloadTraits`](crate::operation_shape::HttpPayloadTraits) to a custom [`Service`](tower::Service).
|
3259 3268 | /// not constrained by the Smithy contract.
|
3260 - | fn http_payload_with_union_custom<S>(mut self, svc: S) -> Self
|
3269 + | fn http_payload_traits_custom<S>(mut self, svc: S) -> Self
|
3261 3270 | where
|
3262 3271 | S: ::tower::Service<
|
3263 3272 | ::http_1x::Request<Body>,
|
3264 3273 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
3265 3274 | Error = ::std::convert::Infallible,
|
3266 3275 | > + Clone
|
3267 3276 | + Send
|
3268 3277 | + 'static,
|
3269 3278 | S::Future: Send + 'static,
|
3270 3279 | {
|
3271 - | self.http_payload_with_union = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
3280 + | self.http_payload_traits = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
3272 3281 | self
|
3273 3282 | }
|
3274 3283 |
|
3275 - | /// Sets the [`HttpPrefixHeaders`](crate::operation_shape::HttpPrefixHeaders) operation.
|
3284 + | /// Sets the [`HttpPayloadTraitsWithMediaType`](crate::operation_shape::HttpPayloadTraitsWithMediaType) operation.
|
3276 3285 | ///
|
3277 3286 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
3278 3287 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
3279 3288 | ///
|
3280 3289 | /// # Example
|
3281 3290 | ///
|
3282 3291 | /// ```no_run
|
3283 3292 | /// use rest_json::{RestJson, RestJsonConfig};
|
3284 3293 | ///
|
3285 3294 | /// use rest_json::{input, output, error};
|
3286 3295 | ///
|
3287 - | /// async fn handler(input: input::HttpPrefixHeadersInput) -> output::HttpPrefixHeadersOutput {
|
3296 + | /// async fn handler(input: input::HttpPayloadTraitsWithMediaTypeInput) -> output::HttpPayloadTraitsWithMediaTypeOutput {
|
3288 3297 | /// todo!()
|
3289 3298 | /// }
|
3290 3299 | ///
|
3291 3300 | /// let config = RestJsonConfig::builder().build();
|
3292 3301 | /// let app = RestJson::builder(config)
|
3293 - | /// .http_prefix_headers(handler)
|
3302 + | /// .http_payload_traits_with_media_type(handler)
|
3294 3303 | /// /* Set other handlers */
|
3295 3304 | /// .build()
|
3296 3305 | /// .unwrap();
|
3297 3306 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3298 3307 | /// ```
|
3299 3308 | ///
|
3300 - | pub fn http_prefix_headers<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3309 + | pub fn http_payload_traits_with_media_type<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3301 3310 | where
|
3302 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpPrefixHeaders, HandlerExtractors>,
|
3311 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpPayloadTraitsWithMediaType, HandlerExtractors>,
|
3303 3312 |
|
3304 3313 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
3305 3314 | RestJson<L>,
|
3306 - | crate::operation_shape::HttpPrefixHeaders,
|
3307 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpPrefixHeaders, HandlerType>
|
3315 + | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
3316 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadTraitsWithMediaType, HandlerType>
|
3308 3317 | >,
|
3309 3318 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
3310 3319 | RestJson<L>,
|
3311 - | crate::operation_shape::HttpPrefixHeaders,
|
3320 + | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
3312 3321 | ModelPl::Output
|
3313 3322 | >,
|
3314 3323 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
3315 3324 | RestJson<L>,
|
3316 - | crate::operation_shape::HttpPrefixHeaders,
|
3325 + | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
3317 3326 | <
|
3318 3327 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3319 3328 | as ::aws_smithy_http_server::plugin::Plugin<
|
3320 3329 | RestJson<L>,
|
3321 - | crate::operation_shape::HttpPrefixHeaders,
|
3330 + | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
3322 3331 | ModelPl::Output
|
3323 3332 | >
|
3324 3333 | >::Output
|
3325 3334 | >,
|
3326 3335 |
|
3327 3336 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3328 3337 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
3329 3338 |
|
3330 3339 | {
|
3331 3340 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
3332 3341 | use ::aws_smithy_http_server::plugin::Plugin;
|
3333 - | let svc = crate::operation_shape::HttpPrefixHeaders::from_handler(handler);
|
3342 + | let svc = crate::operation_shape::HttpPayloadTraitsWithMediaType::from_handler(handler);
|
3334 3343 | let svc = self.model_plugin.apply(svc);
|
3335 3344 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3336 3345 | .apply(svc);
|
3337 3346 | let svc = self.http_plugin.apply(svc);
|
3338 - | self.http_prefix_headers_custom(svc)
|
3347 + | self.http_payload_traits_with_media_type_custom(svc)
|
3339 3348 | }
|
3340 3349 |
|
3341 - | /// Sets the [`HttpPrefixHeaders`](crate::operation_shape::HttpPrefixHeaders) operation.
|
3350 + | /// Sets the [`HttpPayloadTraitsWithMediaType`](crate::operation_shape::HttpPayloadTraitsWithMediaType) operation.
|
3342 3351 | ///
|
3343 3352 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
3344 3353 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
3345 3354 | ///
|
3346 3355 | /// # Example
|
3347 3356 | ///
|
3348 3357 | /// ```no_run
|
3349 3358 | /// use rest_json::{RestJson, RestJsonConfig};
|
3350 3359 | ///
|
3351 3360 | /// use rest_json::{input, output, error};
|
3352 3361 | ///
|
3353 - | /// async fn handler(input: input::HttpPrefixHeadersInput) -> Result<output::HttpPrefixHeadersOutput, std::convert::Infallible> {
|
3362 + | /// async fn handler(input: input::HttpPayloadTraitsWithMediaTypeInput) -> Result<output::HttpPayloadTraitsWithMediaTypeOutput, std::convert::Infallible> {
|
3354 3363 | /// todo!()
|
3355 3364 | /// }
|
3356 3365 | ///
|
3357 3366 | /// let config = RestJsonConfig::builder().build();
|
3358 3367 | /// let svc = ::tower::util::service_fn(handler);
|
3359 3368 | /// let app = RestJson::builder(config)
|
3360 - | /// .http_prefix_headers_service(svc)
|
3369 + | /// .http_payload_traits_with_media_type_service(svc)
|
3361 3370 | /// /* Set other handlers */
|
3362 3371 | /// .build()
|
3363 3372 | /// .unwrap();
|
3364 3373 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3365 3374 | /// ```
|
3366 3375 | ///
|
3367 - | pub fn http_prefix_headers_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3376 + | pub fn http_payload_traits_with_media_type_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3368 3377 | where
|
3369 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpPrefixHeaders, ServiceExtractors>,
|
3378 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadTraitsWithMediaType, ServiceExtractors>,
|
3370 3379 |
|
3371 3380 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
3372 3381 | RestJson<L>,
|
3373 - | crate::operation_shape::HttpPrefixHeaders,
|
3374 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpPrefixHeaders, S>
|
3382 + | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
3383 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadTraitsWithMediaType, S>
|
3375 3384 | >,
|
3376 3385 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
3377 3386 | RestJson<L>,
|
3378 - | crate::operation_shape::HttpPrefixHeaders,
|
3387 + | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
3379 3388 | ModelPl::Output
|
3380 3389 | >,
|
3381 3390 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
3382 3391 | RestJson<L>,
|
3383 - | crate::operation_shape::HttpPrefixHeaders,
|
3392 + | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
3384 3393 | <
|
3385 3394 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3386 3395 | as ::aws_smithy_http_server::plugin::Plugin<
|
3387 3396 | RestJson<L>,
|
3388 - | crate::operation_shape::HttpPrefixHeaders,
|
3397 + | crate::operation_shape::HttpPayloadTraitsWithMediaType,
|
3389 3398 | ModelPl::Output
|
3390 3399 | >
|
3391 3400 | >::Output
|
3392 3401 | >,
|
3393 3402 |
|
3394 3403 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3395 3404 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
3396 3405 |
|
3397 3406 | {
|
3398 3407 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
3399 3408 | use ::aws_smithy_http_server::plugin::Plugin;
|
3400 - | let svc = crate::operation_shape::HttpPrefixHeaders::from_service(service);
|
3409 + | let svc = crate::operation_shape::HttpPayloadTraitsWithMediaType::from_service(service);
|
3401 3410 | let svc = self.model_plugin.apply(svc);
|
3402 3411 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3403 3412 | .apply(svc);
|
3404 3413 | let svc = self.http_plugin.apply(svc);
|
3405 - | self.http_prefix_headers_custom(svc)
|
3414 + | self.http_payload_traits_with_media_type_custom(svc)
|
3406 3415 | }
|
3407 3416 |
|
3408 - | /// Sets the [`HttpPrefixHeaders`](crate::operation_shape::HttpPrefixHeaders) to a custom [`Service`](tower::Service).
|
3417 + | /// Sets the [`HttpPayloadTraitsWithMediaType`](crate::operation_shape::HttpPayloadTraitsWithMediaType) to a custom [`Service`](tower::Service).
|
3409 3418 | /// not constrained by the Smithy contract.
|
3410 - | fn http_prefix_headers_custom<S>(mut self, svc: S) -> Self
|
3419 + | fn http_payload_traits_with_media_type_custom<S>(mut self, svc: S) -> Self
|
3411 3420 | where
|
3412 3421 | S: ::tower::Service<
|
3413 3422 | ::http_1x::Request<Body>,
|
3414 3423 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
3415 3424 | Error = ::std::convert::Infallible,
|
3416 3425 | > + Clone
|
3417 3426 | + Send
|
3418 3427 | + 'static,
|
3419 3428 | S::Future: Send + 'static,
|
3420 3429 | {
|
3421 - | self.http_prefix_headers = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
3430 + | self.http_payload_traits_with_media_type =
|
3431 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
3422 3432 | self
|
3423 3433 | }
|
3424 3434 |
|
3425 - | /// Sets the [`HttpPrefixHeadersInResponse`](crate::operation_shape::HttpPrefixHeadersInResponse) operation.
|
3435 + | /// Sets the [`HttpPayloadWithStructure`](crate::operation_shape::HttpPayloadWithStructure) operation.
|
3426 3436 | ///
|
3427 3437 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
3428 3438 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
3429 3439 | ///
|
3430 3440 | /// # Example
|
3431 3441 | ///
|
3432 3442 | /// ```no_run
|
3433 3443 | /// use rest_json::{RestJson, RestJsonConfig};
|
3434 3444 | ///
|
3435 3445 | /// use rest_json::{input, output, error};
|
3436 3446 | ///
|
3437 - | /// async fn handler(input: input::HttpPrefixHeadersInResponseInput) -> output::HttpPrefixHeadersInResponseOutput {
|
3447 + | /// async fn handler(input: input::HttpPayloadWithStructureInput) -> output::HttpPayloadWithStructureOutput {
|
3438 3448 | /// todo!()
|
3439 3449 | /// }
|
3440 3450 | ///
|
3441 3451 | /// let config = RestJsonConfig::builder().build();
|
3442 3452 | /// let app = RestJson::builder(config)
|
3443 - | /// .http_prefix_headers_in_response(handler)
|
3453 + | /// .http_payload_with_structure(handler)
|
3444 3454 | /// /* Set other handlers */
|
3445 3455 | /// .build()
|
3446 3456 | /// .unwrap();
|
3447 3457 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3448 3458 | /// ```
|
3449 3459 | ///
|
3450 - | pub fn http_prefix_headers_in_response<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3460 + | pub fn http_payload_with_structure<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3451 3461 | where
|
3452 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpPrefixHeadersInResponse, HandlerExtractors>,
|
3462 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpPayloadWithStructure, HandlerExtractors>,
|
3453 3463 |
|
3454 3464 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
3455 3465 | RestJson<L>,
|
3456 - | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3457 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpPrefixHeadersInResponse, HandlerType>
|
3466 + | crate::operation_shape::HttpPayloadWithStructure,
|
3467 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadWithStructure, HandlerType>
|
3458 3468 | >,
|
3459 3469 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
3460 3470 | RestJson<L>,
|
3461 - | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3471 + | crate::operation_shape::HttpPayloadWithStructure,
|
3462 3472 | ModelPl::Output
|
3463 3473 | >,
|
3464 3474 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
3465 3475 | RestJson<L>,
|
3466 - | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3476 + | crate::operation_shape::HttpPayloadWithStructure,
|
3467 3477 | <
|
3468 3478 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3469 3479 | as ::aws_smithy_http_server::plugin::Plugin<
|
3470 3480 | RestJson<L>,
|
3471 - | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3481 + | crate::operation_shape::HttpPayloadWithStructure,
|
3472 3482 | ModelPl::Output
|
3473 3483 | >
|
3474 3484 | >::Output
|
3475 3485 | >,
|
3476 3486 |
|
3477 3487 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3478 3488 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
3479 3489 |
|
3480 3490 | {
|
3481 3491 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
3482 3492 | use ::aws_smithy_http_server::plugin::Plugin;
|
3483 - | let svc = crate::operation_shape::HttpPrefixHeadersInResponse::from_handler(handler);
|
3493 + | let svc = crate::operation_shape::HttpPayloadWithStructure::from_handler(handler);
|
3484 3494 | let svc = self.model_plugin.apply(svc);
|
3485 3495 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3486 3496 | .apply(svc);
|
3487 3497 | let svc = self.http_plugin.apply(svc);
|
3488 - | self.http_prefix_headers_in_response_custom(svc)
|
3498 + | self.http_payload_with_structure_custom(svc)
|
3489 3499 | }
|
3490 3500 |
|
3491 - | /// Sets the [`HttpPrefixHeadersInResponse`](crate::operation_shape::HttpPrefixHeadersInResponse) operation.
|
3501 + | /// Sets the [`HttpPayloadWithStructure`](crate::operation_shape::HttpPayloadWithStructure) operation.
|
3492 3502 | ///
|
3493 3503 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
3494 3504 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
3495 3505 | ///
|
3496 3506 | /// # Example
|
3497 3507 | ///
|
3498 3508 | /// ```no_run
|
3499 3509 | /// use rest_json::{RestJson, RestJsonConfig};
|
3500 3510 | ///
|
3501 3511 | /// use rest_json::{input, output, error};
|
3502 3512 | ///
|
3503 - | /// async fn handler(input: input::HttpPrefixHeadersInResponseInput) -> Result<output::HttpPrefixHeadersInResponseOutput, std::convert::Infallible> {
|
3513 + | /// async fn handler(input: input::HttpPayloadWithStructureInput) -> Result<output::HttpPayloadWithStructureOutput, std::convert::Infallible> {
|
3504 3514 | /// todo!()
|
3505 3515 | /// }
|
3506 3516 | ///
|
3507 3517 | /// let config = RestJsonConfig::builder().build();
|
3508 3518 | /// let svc = ::tower::util::service_fn(handler);
|
3509 3519 | /// let app = RestJson::builder(config)
|
3510 - | /// .http_prefix_headers_in_response_service(svc)
|
3520 + | /// .http_payload_with_structure_service(svc)
|
3511 3521 | /// /* Set other handlers */
|
3512 3522 | /// .build()
|
3513 3523 | /// .unwrap();
|
3514 3524 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3515 3525 | /// ```
|
3516 3526 | ///
|
3517 - | pub fn http_prefix_headers_in_response_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3527 + | pub fn http_payload_with_structure_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3518 3528 | where
|
3519 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpPrefixHeadersInResponse, ServiceExtractors>,
|
3529 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadWithStructure, ServiceExtractors>,
|
3520 3530 |
|
3521 3531 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
3522 3532 | RestJson<L>,
|
3523 - | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3524 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpPrefixHeadersInResponse, S>
|
3533 + | crate::operation_shape::HttpPayloadWithStructure,
|
3534 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadWithStructure, S>
|
3525 3535 | >,
|
3526 3536 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
3527 3537 | RestJson<L>,
|
3528 - | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3538 + | crate::operation_shape::HttpPayloadWithStructure,
|
3529 3539 | ModelPl::Output
|
3530 3540 | >,
|
3531 3541 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
3532 3542 | RestJson<L>,
|
3533 - | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3543 + | crate::operation_shape::HttpPayloadWithStructure,
|
3534 3544 | <
|
3535 3545 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3536 3546 | as ::aws_smithy_http_server::plugin::Plugin<
|
3537 3547 | RestJson<L>,
|
3538 - | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3548 + | crate::operation_shape::HttpPayloadWithStructure,
|
3539 3549 | ModelPl::Output
|
3540 3550 | >
|
3541 3551 | >::Output
|
3542 3552 | >,
|
3543 3553 |
|
3544 3554 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3545 3555 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
3546 3556 |
|
3547 3557 | {
|
3548 3558 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
3549 3559 | use ::aws_smithy_http_server::plugin::Plugin;
|
3550 - | let svc = crate::operation_shape::HttpPrefixHeadersInResponse::from_service(service);
|
3560 + | let svc = crate::operation_shape::HttpPayloadWithStructure::from_service(service);
|
3551 3561 | let svc = self.model_plugin.apply(svc);
|
3552 3562 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3553 3563 | .apply(svc);
|
3554 3564 | let svc = self.http_plugin.apply(svc);
|
3555 - | self.http_prefix_headers_in_response_custom(svc)
|
3565 + | self.http_payload_with_structure_custom(svc)
|
3556 3566 | }
|
3557 3567 |
|
3558 - | /// Sets the [`HttpPrefixHeadersInResponse`](crate::operation_shape::HttpPrefixHeadersInResponse) to a custom [`Service`](tower::Service).
|
3568 + | /// Sets the [`HttpPayloadWithStructure`](crate::operation_shape::HttpPayloadWithStructure) to a custom [`Service`](tower::Service).
|
3559 3569 | /// not constrained by the Smithy contract.
|
3560 - | fn http_prefix_headers_in_response_custom<S>(mut self, svc: S) -> Self
|
3570 + | fn http_payload_with_structure_custom<S>(mut self, svc: S) -> Self
|
3561 3571 | where
|
3562 3572 | S: ::tower::Service<
|
3563 3573 | ::http_1x::Request<Body>,
|
3564 3574 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
3565 3575 | Error = ::std::convert::Infallible,
|
3566 3576 | > + Clone
|
3567 3577 | + Send
|
3568 3578 | + 'static,
|
3569 3579 | S::Future: Send + 'static,
|
3570 3580 | {
|
3571 - | self.http_prefix_headers_in_response =
|
3572 - | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
3581 + | self.http_payload_with_structure = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
3573 3582 | self
|
3574 3583 | }
|
3575 3584 |
|
3576 - | /// Sets the [`HttpRequestWithFloatLabels`](crate::operation_shape::HttpRequestWithFloatLabels) operation.
|
3585 + | /// Sets the [`HttpPayloadWithUnion`](crate::operation_shape::HttpPayloadWithUnion) operation.
|
3577 3586 | ///
|
3578 3587 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
3579 3588 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
3580 3589 | ///
|
3581 3590 | /// # Example
|
3582 3591 | ///
|
3583 3592 | /// ```no_run
|
3584 3593 | /// use rest_json::{RestJson, RestJsonConfig};
|
3585 3594 | ///
|
3586 3595 | /// use rest_json::{input, output, error};
|
3587 3596 | ///
|
3588 - | /// async fn handler(input: input::HttpRequestWithFloatLabelsInput) -> Result<output::HttpRequestWithFloatLabelsOutput, error::HttpRequestWithFloatLabelsError> {
|
3597 + | /// async fn handler(input: input::HttpPayloadWithUnionInput) -> output::HttpPayloadWithUnionOutput {
|
3589 3598 | /// todo!()
|
3590 3599 | /// }
|
3591 3600 | ///
|
3592 3601 | /// let config = RestJsonConfig::builder().build();
|
3593 3602 | /// let app = RestJson::builder(config)
|
3594 - | /// .http_request_with_float_labels(handler)
|
3603 + | /// .http_payload_with_union(handler)
|
3595 3604 | /// /* Set other handlers */
|
3596 3605 | /// .build()
|
3597 3606 | /// .unwrap();
|
3598 3607 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3599 3608 | /// ```
|
3600 3609 | ///
|
3601 - | pub fn http_request_with_float_labels<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3610 + | pub fn http_payload_with_union<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3602 3611 | where
|
3603 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithFloatLabels, HandlerExtractors>,
|
3612 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpPayloadWithUnion, HandlerExtractors>,
|
3604 3613 |
|
3605 3614 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
3606 3615 | RestJson<L>,
|
3607 - | crate::operation_shape::HttpRequestWithFloatLabels,
|
3608 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithFloatLabels, HandlerType>
|
3616 + | crate::operation_shape::HttpPayloadWithUnion,
|
3617 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpPayloadWithUnion, HandlerType>
|
3609 3618 | >,
|
3610 3619 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
3611 3620 | RestJson<L>,
|
3612 - | crate::operation_shape::HttpRequestWithFloatLabels,
|
3621 + | crate::operation_shape::HttpPayloadWithUnion,
|
3613 3622 | ModelPl::Output
|
3614 3623 | >,
|
3615 3624 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
3616 3625 | RestJson<L>,
|
3617 - | crate::operation_shape::HttpRequestWithFloatLabels,
|
3626 + | crate::operation_shape::HttpPayloadWithUnion,
|
3618 3627 | <
|
3619 3628 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3620 3629 | as ::aws_smithy_http_server::plugin::Plugin<
|
3621 3630 | RestJson<L>,
|
3622 - | crate::operation_shape::HttpRequestWithFloatLabels,
|
3631 + | crate::operation_shape::HttpPayloadWithUnion,
|
3623 3632 | ModelPl::Output
|
3624 3633 | >
|
3625 3634 | >::Output
|
3626 3635 | >,
|
3627 3636 |
|
3628 3637 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3629 3638 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
3630 3639 |
|
3631 3640 | {
|
3632 3641 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
3633 3642 | use ::aws_smithy_http_server::plugin::Plugin;
|
3634 - | let svc = crate::operation_shape::HttpRequestWithFloatLabels::from_handler(handler);
|
3643 + | let svc = crate::operation_shape::HttpPayloadWithUnion::from_handler(handler);
|
3635 3644 | let svc = self.model_plugin.apply(svc);
|
3636 3645 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3637 3646 | .apply(svc);
|
3638 3647 | let svc = self.http_plugin.apply(svc);
|
3639 - | self.http_request_with_float_labels_custom(svc)
|
3648 + | self.http_payload_with_union_custom(svc)
|
3640 3649 | }
|
3641 3650 |
|
3642 - | /// Sets the [`HttpRequestWithFloatLabels`](crate::operation_shape::HttpRequestWithFloatLabels) operation.
|
3651 + | /// Sets the [`HttpPayloadWithUnion`](crate::operation_shape::HttpPayloadWithUnion) operation.
|
3643 3652 | ///
|
3644 3653 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
3645 3654 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
3646 3655 | ///
|
3647 3656 | /// # Example
|
3648 3657 | ///
|
3649 3658 | /// ```no_run
|
3650 3659 | /// use rest_json::{RestJson, RestJsonConfig};
|
3651 3660 | ///
|
3652 3661 | /// use rest_json::{input, output, error};
|
3653 3662 | ///
|
3654 - | /// async fn handler(input: input::HttpRequestWithFloatLabelsInput) -> Result<output::HttpRequestWithFloatLabelsOutput, error::HttpRequestWithFloatLabelsError> {
|
3663 + | /// async fn handler(input: input::HttpPayloadWithUnionInput) -> Result<output::HttpPayloadWithUnionOutput, std::convert::Infallible> {
|
3655 3664 | /// todo!()
|
3656 3665 | /// }
|
3657 3666 | ///
|
3658 3667 | /// let config = RestJsonConfig::builder().build();
|
3659 3668 | /// let svc = ::tower::util::service_fn(handler);
|
3660 3669 | /// let app = RestJson::builder(config)
|
3661 - | /// .http_request_with_float_labels_service(svc)
|
3670 + | /// .http_payload_with_union_service(svc)
|
3662 3671 | /// /* Set other handlers */
|
3663 3672 | /// .build()
|
3664 3673 | /// .unwrap();
|
3665 3674 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3666 3675 | /// ```
|
3667 3676 | ///
|
3668 - | pub fn http_request_with_float_labels_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3677 + | pub fn http_payload_with_union_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3669 3678 | where
|
3670 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithFloatLabels, ServiceExtractors>,
|
3679 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpPayloadWithUnion, ServiceExtractors>,
|
3671 3680 |
|
3672 3681 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
3673 3682 | RestJson<L>,
|
3674 - | crate::operation_shape::HttpRequestWithFloatLabels,
|
3675 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithFloatLabels, S>
|
3683 + | crate::operation_shape::HttpPayloadWithUnion,
|
3684 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpPayloadWithUnion, S>
|
3676 3685 | >,
|
3677 3686 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
3678 3687 | RestJson<L>,
|
3679 - | crate::operation_shape::HttpRequestWithFloatLabels,
|
3688 + | crate::operation_shape::HttpPayloadWithUnion,
|
3680 3689 | ModelPl::Output
|
3681 3690 | >,
|
3682 3691 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
3683 3692 | RestJson<L>,
|
3684 - | crate::operation_shape::HttpRequestWithFloatLabels,
|
3693 + | crate::operation_shape::HttpPayloadWithUnion,
|
3685 3694 | <
|
3686 3695 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3687 3696 | as ::aws_smithy_http_server::plugin::Plugin<
|
3688 3697 | RestJson<L>,
|
3689 - | crate::operation_shape::HttpRequestWithFloatLabels,
|
3698 + | crate::operation_shape::HttpPayloadWithUnion,
|
3690 3699 | ModelPl::Output
|
3691 3700 | >
|
3692 3701 | >::Output
|
3693 3702 | >,
|
3694 3703 |
|
3695 3704 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3696 3705 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
3697 3706 |
|
3698 3707 | {
|
3699 3708 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
3700 3709 | use ::aws_smithy_http_server::plugin::Plugin;
|
3701 - | let svc = crate::operation_shape::HttpRequestWithFloatLabels::from_service(service);
|
3710 + | let svc = crate::operation_shape::HttpPayloadWithUnion::from_service(service);
|
3702 3711 | let svc = self.model_plugin.apply(svc);
|
3703 3712 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3704 3713 | .apply(svc);
|
3705 3714 | let svc = self.http_plugin.apply(svc);
|
3706 - | self.http_request_with_float_labels_custom(svc)
|
3715 + | self.http_payload_with_union_custom(svc)
|
3707 3716 | }
|
3708 3717 |
|
3709 - | /// Sets the [`HttpRequestWithFloatLabels`](crate::operation_shape::HttpRequestWithFloatLabels) to a custom [`Service`](tower::Service).
|
3718 + | /// Sets the [`HttpPayloadWithUnion`](crate::operation_shape::HttpPayloadWithUnion) to a custom [`Service`](tower::Service).
|
3710 3719 | /// not constrained by the Smithy contract.
|
3711 - | fn http_request_with_float_labels_custom<S>(mut self, svc: S) -> Self
|
3720 + | fn http_payload_with_union_custom<S>(mut self, svc: S) -> Self
|
3712 3721 | where
|
3713 3722 | S: ::tower::Service<
|
3714 3723 | ::http_1x::Request<Body>,
|
3715 3724 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
3716 3725 | Error = ::std::convert::Infallible,
|
3717 3726 | > + Clone
|
3718 3727 | + Send
|
3719 3728 | + 'static,
|
3720 3729 | S::Future: Send + 'static,
|
3721 3730 | {
|
3722 - | self.http_request_with_float_labels =
|
3723 - | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
3731 + | self.http_payload_with_union = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
3724 3732 | self
|
3725 3733 | }
|
3726 3734 |
|
3727 - | /// Sets the [`HttpRequestWithGreedyLabelInPath`](crate::operation_shape::HttpRequestWithGreedyLabelInPath) operation.
|
3735 + | /// Sets the [`HttpPrefixHeaders`](crate::operation_shape::HttpPrefixHeaders) operation.
|
3728 3736 | ///
|
3729 3737 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
3730 3738 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
3731 3739 | ///
|
3732 3740 | /// # Example
|
3733 3741 | ///
|
3734 3742 | /// ```no_run
|
3735 3743 | /// use rest_json::{RestJson, RestJsonConfig};
|
3736 3744 | ///
|
3737 3745 | /// use rest_json::{input, output, error};
|
3738 3746 | ///
|
3739 - | /// async fn handler(input: input::HttpRequestWithGreedyLabelInPathInput) -> Result<output::HttpRequestWithGreedyLabelInPathOutput, error::HttpRequestWithGreedyLabelInPathError> {
|
3747 + | /// async fn handler(input: input::HttpPrefixHeadersInput) -> output::HttpPrefixHeadersOutput {
|
3740 3748 | /// todo!()
|
3741 3749 | /// }
|
3742 3750 | ///
|
3743 3751 | /// let config = RestJsonConfig::builder().build();
|
3744 3752 | /// let app = RestJson::builder(config)
|
3745 - | /// .http_request_with_greedy_label_in_path(handler)
|
3753 + | /// .http_prefix_headers(handler)
|
3746 3754 | /// /* Set other handlers */
|
3747 3755 | /// .build()
|
3748 3756 | /// .unwrap();
|
3749 3757 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3750 3758 | /// ```
|
3751 3759 | ///
|
3752 - | pub fn http_request_with_greedy_label_in_path<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3760 + | pub fn http_prefix_headers<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3753 3761 | where
|
3754 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithGreedyLabelInPath, HandlerExtractors>,
|
3762 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpPrefixHeaders, HandlerExtractors>,
|
3755 3763 |
|
3756 3764 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
3757 3765 | RestJson<L>,
|
3758 - | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
3759 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithGreedyLabelInPath, HandlerType>
|
3766 + | crate::operation_shape::HttpPrefixHeaders,
|
3767 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpPrefixHeaders, HandlerType>
|
3760 3768 | >,
|
3761 3769 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
3762 3770 | RestJson<L>,
|
3763 - | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
3771 + | crate::operation_shape::HttpPrefixHeaders,
|
3764 3772 | ModelPl::Output
|
3765 3773 | >,
|
3766 3774 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
3767 3775 | RestJson<L>,
|
3768 - | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
3776 + | crate::operation_shape::HttpPrefixHeaders,
|
3769 3777 | <
|
3770 3778 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3771 3779 | as ::aws_smithy_http_server::plugin::Plugin<
|
3772 3780 | RestJson<L>,
|
3773 - | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
3781 + | crate::operation_shape::HttpPrefixHeaders,
|
3774 3782 | ModelPl::Output
|
3775 3783 | >
|
3776 3784 | >::Output
|
3777 3785 | >,
|
3778 3786 |
|
3779 3787 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3780 3788 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
3781 3789 |
|
3782 3790 | {
|
3783 3791 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
3784 3792 | use ::aws_smithy_http_server::plugin::Plugin;
|
3785 - | let svc = crate::operation_shape::HttpRequestWithGreedyLabelInPath::from_handler(handler);
|
3793 + | let svc = crate::operation_shape::HttpPrefixHeaders::from_handler(handler);
|
3786 3794 | let svc = self.model_plugin.apply(svc);
|
3787 3795 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3788 3796 | .apply(svc);
|
3789 3797 | let svc = self.http_plugin.apply(svc);
|
3790 - | self.http_request_with_greedy_label_in_path_custom(svc)
|
3798 + | self.http_prefix_headers_custom(svc)
|
3791 3799 | }
|
3792 3800 |
|
3793 - | /// Sets the [`HttpRequestWithGreedyLabelInPath`](crate::operation_shape::HttpRequestWithGreedyLabelInPath) operation.
|
3801 + | /// Sets the [`HttpPrefixHeaders`](crate::operation_shape::HttpPrefixHeaders) operation.
|
3794 3802 | ///
|
3795 3803 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
3796 3804 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
3797 3805 | ///
|
3798 3806 | /// # Example
|
3799 3807 | ///
|
3800 3808 | /// ```no_run
|
3801 3809 | /// use rest_json::{RestJson, RestJsonConfig};
|
3802 3810 | ///
|
3803 3811 | /// use rest_json::{input, output, error};
|
3804 3812 | ///
|
3805 - | /// async fn handler(input: input::HttpRequestWithGreedyLabelInPathInput) -> Result<output::HttpRequestWithGreedyLabelInPathOutput, error::HttpRequestWithGreedyLabelInPathError> {
|
3813 + | /// async fn handler(input: input::HttpPrefixHeadersInput) -> Result<output::HttpPrefixHeadersOutput, std::convert::Infallible> {
|
3806 3814 | /// todo!()
|
3807 3815 | /// }
|
3808 3816 | ///
|
3809 3817 | /// let config = RestJsonConfig::builder().build();
|
3810 3818 | /// let svc = ::tower::util::service_fn(handler);
|
3811 3819 | /// let app = RestJson::builder(config)
|
3812 - | /// .http_request_with_greedy_label_in_path_service(svc)
|
3820 + | /// .http_prefix_headers_service(svc)
|
3813 3821 | /// /* Set other handlers */
|
3814 3822 | /// .build()
|
3815 3823 | /// .unwrap();
|
3816 3824 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3817 3825 | /// ```
|
3818 3826 | ///
|
3819 - | pub fn http_request_with_greedy_label_in_path_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3827 + | pub fn http_prefix_headers_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3820 3828 | where
|
3821 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithGreedyLabelInPath, ServiceExtractors>,
|
3829 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpPrefixHeaders, ServiceExtractors>,
|
3822 3830 |
|
3823 3831 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
3824 3832 | RestJson<L>,
|
3825 - | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
3826 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithGreedyLabelInPath, S>
|
3833 + | crate::operation_shape::HttpPrefixHeaders,
|
3834 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpPrefixHeaders, S>
|
3827 3835 | >,
|
3828 3836 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
3829 3837 | RestJson<L>,
|
3830 - | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
3838 + | crate::operation_shape::HttpPrefixHeaders,
|
3831 3839 | ModelPl::Output
|
3832 3840 | >,
|
3833 3841 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
3834 3842 | RestJson<L>,
|
3835 - | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
3843 + | crate::operation_shape::HttpPrefixHeaders,
|
3836 3844 | <
|
3837 3845 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3838 3846 | as ::aws_smithy_http_server::plugin::Plugin<
|
3839 3847 | RestJson<L>,
|
3840 - | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
3848 + | crate::operation_shape::HttpPrefixHeaders,
|
3841 3849 | ModelPl::Output
|
3842 3850 | >
|
3843 3851 | >::Output
|
3844 3852 | >,
|
3845 3853 |
|
3846 3854 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3847 3855 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
3848 3856 |
|
3849 3857 | {
|
3850 3858 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
3851 3859 | use ::aws_smithy_http_server::plugin::Plugin;
|
3852 - | let svc = crate::operation_shape::HttpRequestWithGreedyLabelInPath::from_service(service);
|
3860 + | let svc = crate::operation_shape::HttpPrefixHeaders::from_service(service);
|
3853 3861 | let svc = self.model_plugin.apply(svc);
|
3854 3862 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3855 3863 | .apply(svc);
|
3856 3864 | let svc = self.http_plugin.apply(svc);
|
3857 - | self.http_request_with_greedy_label_in_path_custom(svc)
|
3865 + | self.http_prefix_headers_custom(svc)
|
3858 3866 | }
|
3859 3867 |
|
3860 - | /// Sets the [`HttpRequestWithGreedyLabelInPath`](crate::operation_shape::HttpRequestWithGreedyLabelInPath) to a custom [`Service`](tower::Service).
|
3868 + | /// Sets the [`HttpPrefixHeaders`](crate::operation_shape::HttpPrefixHeaders) to a custom [`Service`](tower::Service).
|
3861 3869 | /// not constrained by the Smithy contract.
|
3862 - | fn http_request_with_greedy_label_in_path_custom<S>(mut self, svc: S) -> Self
|
3870 + | fn http_prefix_headers_custom<S>(mut self, svc: S) -> Self
|
3863 3871 | where
|
3864 3872 | S: ::tower::Service<
|
3865 3873 | ::http_1x::Request<Body>,
|
3866 3874 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
3867 3875 | Error = ::std::convert::Infallible,
|
3868 3876 | > + Clone
|
3869 3877 | + Send
|
3870 3878 | + 'static,
|
3871 3879 | S::Future: Send + 'static,
|
3872 3880 | {
|
3873 - | self.http_request_with_greedy_label_in_path =
|
3874 - | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
3881 + | self.http_prefix_headers = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
3875 3882 | self
|
3876 3883 | }
|
3877 3884 |
|
3878 - | /// Sets the [`HttpRequestWithLabels`](crate::operation_shape::HttpRequestWithLabels) operation.
|
3885 + | /// Sets the [`HttpPrefixHeadersInResponse`](crate::operation_shape::HttpPrefixHeadersInResponse) operation.
|
3879 3886 | ///
|
3880 3887 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
3881 3888 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
3882 3889 | ///
|
3883 3890 | /// # Example
|
3884 3891 | ///
|
3885 3892 | /// ```no_run
|
3886 3893 | /// use rest_json::{RestJson, RestJsonConfig};
|
3887 3894 | ///
|
3888 3895 | /// use rest_json::{input, output, error};
|
3889 3896 | ///
|
3890 - | /// async fn handler(input: input::HttpRequestWithLabelsInput) -> Result<output::HttpRequestWithLabelsOutput, error::HttpRequestWithLabelsError> {
|
3897 + | /// async fn handler(input: input::HttpPrefixHeadersInResponseInput) -> output::HttpPrefixHeadersInResponseOutput {
|
3891 3898 | /// todo!()
|
3892 3899 | /// }
|
3893 3900 | ///
|
3894 3901 | /// let config = RestJsonConfig::builder().build();
|
3895 3902 | /// let app = RestJson::builder(config)
|
3896 - | /// .http_request_with_labels(handler)
|
3903 + | /// .http_prefix_headers_in_response(handler)
|
3897 3904 | /// /* Set other handlers */
|
3898 3905 | /// .build()
|
3899 3906 | /// .unwrap();
|
3900 3907 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3901 3908 | /// ```
|
3902 3909 | ///
|
3903 - | pub fn http_request_with_labels<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3910 + | pub fn http_prefix_headers_in_response<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
3904 3911 | where
|
3905 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithLabels, HandlerExtractors>,
|
3912 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpPrefixHeadersInResponse, HandlerExtractors>,
|
3906 3913 |
|
3907 3914 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
3908 3915 | RestJson<L>,
|
3909 - | crate::operation_shape::HttpRequestWithLabels,
|
3910 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithLabels, HandlerType>
|
3916 + | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3917 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpPrefixHeadersInResponse, HandlerType>
|
3911 3918 | >,
|
3912 3919 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
3913 3920 | RestJson<L>,
|
3914 - | crate::operation_shape::HttpRequestWithLabels,
|
3921 + | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3915 3922 | ModelPl::Output
|
3916 3923 | >,
|
3917 3924 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
3918 3925 | RestJson<L>,
|
3919 - | crate::operation_shape::HttpRequestWithLabels,
|
3926 + | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3920 3927 | <
|
3921 3928 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3922 3929 | as ::aws_smithy_http_server::plugin::Plugin<
|
3923 3930 | RestJson<L>,
|
3924 - | crate::operation_shape::HttpRequestWithLabels,
|
3931 + | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3925 3932 | ModelPl::Output
|
3926 3933 | >
|
3927 3934 | >::Output
|
3928 3935 | >,
|
3929 3936 |
|
3930 3937 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3931 3938 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
3932 3939 |
|
3933 3940 | {
|
3934 3941 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
3935 3942 | use ::aws_smithy_http_server::plugin::Plugin;
|
3936 - | let svc = crate::operation_shape::HttpRequestWithLabels::from_handler(handler);
|
3943 + | let svc = crate::operation_shape::HttpPrefixHeadersInResponse::from_handler(handler);
|
3937 3944 | let svc = self.model_plugin.apply(svc);
|
3938 3945 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
3939 3946 | .apply(svc);
|
3940 3947 | let svc = self.http_plugin.apply(svc);
|
3941 - | self.http_request_with_labels_custom(svc)
|
3948 + | self.http_prefix_headers_in_response_custom(svc)
|
3942 3949 | }
|
3943 3950 |
|
3944 - | /// Sets the [`HttpRequestWithLabels`](crate::operation_shape::HttpRequestWithLabels) operation.
|
3951 + | /// Sets the [`HttpPrefixHeadersInResponse`](crate::operation_shape::HttpPrefixHeadersInResponse) operation.
|
3945 3952 | ///
|
3946 3953 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
3947 3954 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
3948 3955 | ///
|
3949 3956 | /// # Example
|
3950 3957 | ///
|
3951 3958 | /// ```no_run
|
3952 3959 | /// use rest_json::{RestJson, RestJsonConfig};
|
3953 3960 | ///
|
3954 3961 | /// use rest_json::{input, output, error};
|
3955 3962 | ///
|
3956 - | /// async fn handler(input: input::HttpRequestWithLabelsInput) -> Result<output::HttpRequestWithLabelsOutput, error::HttpRequestWithLabelsError> {
|
3963 + | /// async fn handler(input: input::HttpPrefixHeadersInResponseInput) -> Result<output::HttpPrefixHeadersInResponseOutput, std::convert::Infallible> {
|
3957 3964 | /// todo!()
|
3958 3965 | /// }
|
3959 3966 | ///
|
3960 3967 | /// let config = RestJsonConfig::builder().build();
|
3961 3968 | /// let svc = ::tower::util::service_fn(handler);
|
3962 3969 | /// let app = RestJson::builder(config)
|
3963 - | /// .http_request_with_labels_service(svc)
|
3970 + | /// .http_prefix_headers_in_response_service(svc)
|
3964 3971 | /// /* Set other handlers */
|
3965 3972 | /// .build()
|
3966 3973 | /// .unwrap();
|
3967 3974 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
3968 3975 | /// ```
|
3969 3976 | ///
|
3970 - | pub fn http_request_with_labels_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3977 + | pub fn http_prefix_headers_in_response_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
3971 3978 | where
|
3972 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithLabels, ServiceExtractors>,
|
3979 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpPrefixHeadersInResponse, ServiceExtractors>,
|
3973 3980 |
|
3974 3981 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
3975 3982 | RestJson<L>,
|
3976 - | crate::operation_shape::HttpRequestWithLabels,
|
3977 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithLabels, S>
|
3983 + | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3984 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpPrefixHeadersInResponse, S>
|
3978 3985 | >,
|
3979 3986 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
3980 3987 | RestJson<L>,
|
3981 - | crate::operation_shape::HttpRequestWithLabels,
|
3988 + | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3982 3989 | ModelPl::Output
|
3983 3990 | >,
|
3984 3991 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
3985 3992 | RestJson<L>,
|
3986 - | crate::operation_shape::HttpRequestWithLabels,
|
3993 + | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3987 3994 | <
|
3988 3995 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
3989 3996 | as ::aws_smithy_http_server::plugin::Plugin<
|
3990 3997 | RestJson<L>,
|
3991 - | crate::operation_shape::HttpRequestWithLabels,
|
3998 + | crate::operation_shape::HttpPrefixHeadersInResponse,
|
3992 3999 | ModelPl::Output
|
3993 4000 | >
|
3994 4001 | >::Output
|
3995 4002 | >,
|
3996 4003 |
|
3997 4004 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
3998 4005 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
3999 4006 |
|
4000 4007 | {
|
4001 4008 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
4002 4009 | use ::aws_smithy_http_server::plugin::Plugin;
|
4003 - | let svc = crate::operation_shape::HttpRequestWithLabels::from_service(service);
|
4010 + | let svc = crate::operation_shape::HttpPrefixHeadersInResponse::from_service(service);
|
4004 4011 | let svc = self.model_plugin.apply(svc);
|
4005 4012 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4006 4013 | .apply(svc);
|
4007 4014 | let svc = self.http_plugin.apply(svc);
|
4008 - | self.http_request_with_labels_custom(svc)
|
4015 + | self.http_prefix_headers_in_response_custom(svc)
|
4009 4016 | }
|
4010 4017 |
|
4011 - | /// Sets the [`HttpRequestWithLabels`](crate::operation_shape::HttpRequestWithLabels) to a custom [`Service`](tower::Service).
|
4018 + | /// Sets the [`HttpPrefixHeadersInResponse`](crate::operation_shape::HttpPrefixHeadersInResponse) to a custom [`Service`](tower::Service).
|
4012 4019 | /// not constrained by the Smithy contract.
|
4013 - | fn http_request_with_labels_custom<S>(mut self, svc: S) -> Self
|
4020 + | fn http_prefix_headers_in_response_custom<S>(mut self, svc: S) -> Self
|
4014 4021 | where
|
4015 4022 | S: ::tower::Service<
|
4016 4023 | ::http_1x::Request<Body>,
|
4017 4024 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
4018 4025 | Error = ::std::convert::Infallible,
|
4019 4026 | > + Clone
|
4020 4027 | + Send
|
4021 4028 | + 'static,
|
4022 4029 | S::Future: Send + 'static,
|
4023 4030 | {
|
4024 - | self.http_request_with_labels = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
4031 + | self.http_prefix_headers_in_response =
|
4032 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
4025 4033 | self
|
4026 4034 | }
|
4027 4035 |
|
4028 - | /// Sets the [`HttpRequestWithLabelsAndTimestampFormat`](crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat) operation.
|
4036 + | /// Sets the [`HttpQueryParamsOnlyOperation`](crate::operation_shape::HttpQueryParamsOnlyOperation) operation.
|
4029 4037 | ///
|
4030 4038 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
4031 4039 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
4032 4040 | ///
|
4033 4041 | /// # Example
|
4034 4042 | ///
|
4035 4043 | /// ```no_run
|
4036 4044 | /// use rest_json::{RestJson, RestJsonConfig};
|
4037 4045 | ///
|
4038 4046 | /// use rest_json::{input, output, error};
|
4039 4047 | ///
|
4040 - | /// async fn handler(input: input::HttpRequestWithLabelsAndTimestampFormatInput) -> Result<output::HttpRequestWithLabelsAndTimestampFormatOutput, error::HttpRequestWithLabelsAndTimestampFormatError> {
|
4048 + | /// async fn handler(input: input::HttpQueryParamsOnlyOperationInput) -> output::HttpQueryParamsOnlyOperationOutput {
|
4041 4049 | /// todo!()
|
4042 4050 | /// }
|
4043 4051 | ///
|
4044 4052 | /// let config = RestJsonConfig::builder().build();
|
4045 4053 | /// let app = RestJson::builder(config)
|
4046 - | /// .http_request_with_labels_and_timestamp_format(handler)
|
4054 + | /// .http_query_params_only_operation(handler)
|
4047 4055 | /// /* Set other handlers */
|
4048 4056 | /// .build()
|
4049 4057 | /// .unwrap();
|
4050 4058 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4051 4059 | /// ```
|
4052 4060 | ///
|
4053 - | pub fn http_request_with_labels_and_timestamp_format<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4061 + | pub fn http_query_params_only_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4054 4062 | where
|
4055 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat, HandlerExtractors>,
|
4063 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpQueryParamsOnlyOperation, HandlerExtractors>,
|
4056 4064 |
|
4057 4065 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
4058 4066 | RestJson<L>,
|
4059 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4060 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat, HandlerType>
|
4067 + | crate::operation_shape::HttpQueryParamsOnlyOperation,
|
4068 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpQueryParamsOnlyOperation, HandlerType>
|
4061 4069 | >,
|
4062 4070 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
4063 4071 | RestJson<L>,
|
4064 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4072 + | crate::operation_shape::HttpQueryParamsOnlyOperation,
|
4065 4073 | ModelPl::Output
|
4066 4074 | >,
|
4067 4075 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
4068 4076 | RestJson<L>,
|
4069 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4077 + | crate::operation_shape::HttpQueryParamsOnlyOperation,
|
4070 4078 | <
|
4071 4079 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4072 4080 | as ::aws_smithy_http_server::plugin::Plugin<
|
4073 4081 | RestJson<L>,
|
4074 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4082 + | crate::operation_shape::HttpQueryParamsOnlyOperation,
|
4075 4083 | ModelPl::Output
|
4076 4084 | >
|
4077 4085 | >::Output
|
4078 4086 | >,
|
4079 4087 |
|
4080 4088 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4081 4089 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
4082 4090 |
|
4083 4091 | {
|
4084 4092 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
4085 4093 | use ::aws_smithy_http_server::plugin::Plugin;
|
4086 - | let svc =
|
4087 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat::from_handler(handler);
|
4094 + | let svc = crate::operation_shape::HttpQueryParamsOnlyOperation::from_handler(handler);
|
4088 4095 | let svc = self.model_plugin.apply(svc);
|
4089 4096 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4090 4097 | .apply(svc);
|
4091 4098 | let svc = self.http_plugin.apply(svc);
|
4092 - | self.http_request_with_labels_and_timestamp_format_custom(svc)
|
4099 + | self.http_query_params_only_operation_custom(svc)
|
4093 4100 | }
|
4094 4101 |
|
4095 - | /// Sets the [`HttpRequestWithLabelsAndTimestampFormat`](crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat) operation.
|
4102 + | /// Sets the [`HttpQueryParamsOnlyOperation`](crate::operation_shape::HttpQueryParamsOnlyOperation) operation.
|
4096 4103 | ///
|
4097 4104 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
4098 4105 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
4099 4106 | ///
|
4100 4107 | /// # Example
|
4101 4108 | ///
|
4102 4109 | /// ```no_run
|
4103 4110 | /// use rest_json::{RestJson, RestJsonConfig};
|
4104 4111 | ///
|
4105 4112 | /// use rest_json::{input, output, error};
|
4106 4113 | ///
|
4107 - | /// async fn handler(input: input::HttpRequestWithLabelsAndTimestampFormatInput) -> Result<output::HttpRequestWithLabelsAndTimestampFormatOutput, error::HttpRequestWithLabelsAndTimestampFormatError> {
|
4114 + | /// async fn handler(input: input::HttpQueryParamsOnlyOperationInput) -> Result<output::HttpQueryParamsOnlyOperationOutput, std::convert::Infallible> {
|
4108 4115 | /// todo!()
|
4109 4116 | /// }
|
4110 4117 | ///
|
4111 4118 | /// let config = RestJsonConfig::builder().build();
|
4112 4119 | /// let svc = ::tower::util::service_fn(handler);
|
4113 4120 | /// let app = RestJson::builder(config)
|
4114 - | /// .http_request_with_labels_and_timestamp_format_service(svc)
|
4121 + | /// .http_query_params_only_operation_service(svc)
|
4115 4122 | /// /* Set other handlers */
|
4116 4123 | /// .build()
|
4117 4124 | /// .unwrap();
|
4118 4125 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4119 4126 | /// ```
|
4120 4127 | ///
|
4121 - | pub fn http_request_with_labels_and_timestamp_format_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4128 + | pub fn http_query_params_only_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4122 4129 | where
|
4123 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat, ServiceExtractors>,
|
4130 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpQueryParamsOnlyOperation, ServiceExtractors>,
|
4124 4131 |
|
4125 4132 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
4126 4133 | RestJson<L>,
|
4127 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4128 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat, S>
|
4134 + | crate::operation_shape::HttpQueryParamsOnlyOperation,
|
4135 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpQueryParamsOnlyOperation, S>
|
4129 4136 | >,
|
4130 4137 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
4131 4138 | RestJson<L>,
|
4132 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4139 + | crate::operation_shape::HttpQueryParamsOnlyOperation,
|
4133 4140 | ModelPl::Output
|
4134 4141 | >,
|
4135 4142 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
4136 4143 | RestJson<L>,
|
4137 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4144 + | crate::operation_shape::HttpQueryParamsOnlyOperation,
|
4138 4145 | <
|
4139 4146 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4140 4147 | as ::aws_smithy_http_server::plugin::Plugin<
|
4141 4148 | RestJson<L>,
|
4142 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4149 + | crate::operation_shape::HttpQueryParamsOnlyOperation,
|
4143 4150 | ModelPl::Output
|
4144 4151 | >
|
4145 4152 | >::Output
|
4146 4153 | >,
|
4147 4154 |
|
4148 4155 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4149 4156 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
4150 4157 |
|
4151 4158 | {
|
4152 4159 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
4153 4160 | use ::aws_smithy_http_server::plugin::Plugin;
|
4154 - | let svc =
|
4155 - | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat::from_service(service);
|
4161 + | let svc = crate::operation_shape::HttpQueryParamsOnlyOperation::from_service(service);
|
4156 4162 | let svc = self.model_plugin.apply(svc);
|
4157 4163 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4158 4164 | .apply(svc);
|
4159 4165 | let svc = self.http_plugin.apply(svc);
|
4160 - | self.http_request_with_labels_and_timestamp_format_custom(svc)
|
4166 + | self.http_query_params_only_operation_custom(svc)
|
4161 4167 | }
|
4162 4168 |
|
4163 - | /// Sets the [`HttpRequestWithLabelsAndTimestampFormat`](crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat) to a custom [`Service`](tower::Service).
|
4169 + | /// Sets the [`HttpQueryParamsOnlyOperation`](crate::operation_shape::HttpQueryParamsOnlyOperation) to a custom [`Service`](tower::Service).
|
4164 4170 | /// not constrained by the Smithy contract.
|
4165 - | fn http_request_with_labels_and_timestamp_format_custom<S>(mut self, svc: S) -> Self
|
4171 + | fn http_query_params_only_operation_custom<S>(mut self, svc: S) -> Self
|
4166 4172 | where
|
4167 4173 | S: ::tower::Service<
|
4168 4174 | ::http_1x::Request<Body>,
|
4169 4175 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
4170 4176 | Error = ::std::convert::Infallible,
|
4171 4177 | > + Clone
|
4172 4178 | + Send
|
4173 4179 | + 'static,
|
4174 4180 | S::Future: Send + 'static,
|
4175 4181 | {
|
4176 - | self.http_request_with_labels_and_timestamp_format =
|
4182 + | self.http_query_params_only_operation =
|
4177 4183 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
4178 4184 | self
|
4179 4185 | }
|
4180 4186 |
|
4181 - | /// Sets the [`HttpRequestWithRegexLiteral`](crate::operation_shape::HttpRequestWithRegexLiteral) operation.
|
4187 + | /// Sets the [`HttpRequestWithFloatLabels`](crate::operation_shape::HttpRequestWithFloatLabels) operation.
|
4182 4188 | ///
|
4183 4189 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
4184 4190 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
4185 4191 | ///
|
4186 4192 | /// # Example
|
4187 4193 | ///
|
4188 4194 | /// ```no_run
|
4189 4195 | /// use rest_json::{RestJson, RestJsonConfig};
|
4190 4196 | ///
|
4191 4197 | /// use rest_json::{input, output, error};
|
4192 4198 | ///
|
4193 - | /// async fn handler(input: input::HttpRequestWithRegexLiteralInput) -> Result<output::HttpRequestWithRegexLiteralOutput, error::HttpRequestWithRegexLiteralError> {
|
4199 + | /// async fn handler(input: input::HttpRequestWithFloatLabelsInput) -> Result<output::HttpRequestWithFloatLabelsOutput, error::HttpRequestWithFloatLabelsError> {
|
4194 4200 | /// todo!()
|
4195 4201 | /// }
|
4196 4202 | ///
|
4197 4203 | /// let config = RestJsonConfig::builder().build();
|
4198 4204 | /// let app = RestJson::builder(config)
|
4199 - | /// .http_request_with_regex_literal(handler)
|
4205 + | /// .http_request_with_float_labels(handler)
|
4200 4206 | /// /* Set other handlers */
|
4201 4207 | /// .build()
|
4202 4208 | /// .unwrap();
|
4203 4209 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4204 4210 | /// ```
|
4205 4211 | ///
|
4206 - | pub fn http_request_with_regex_literal<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4212 + | pub fn http_request_with_float_labels<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4207 4213 | where
|
4208 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithRegexLiteral, HandlerExtractors>,
|
4214 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithFloatLabels, HandlerExtractors>,
|
4209 4215 |
|
4210 4216 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
4211 4217 | RestJson<L>,
|
4212 - | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4213 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithRegexLiteral, HandlerType>
|
4218 + | crate::operation_shape::HttpRequestWithFloatLabels,
|
4219 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithFloatLabels, HandlerType>
|
4214 4220 | >,
|
4215 4221 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
4216 4222 | RestJson<L>,
|
4217 - | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4223 + | crate::operation_shape::HttpRequestWithFloatLabels,
|
4218 4224 | ModelPl::Output
|
4219 4225 | >,
|
4220 4226 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
4221 4227 | RestJson<L>,
|
4222 - | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4228 + | crate::operation_shape::HttpRequestWithFloatLabels,
|
4223 4229 | <
|
4224 4230 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4225 4231 | as ::aws_smithy_http_server::plugin::Plugin<
|
4226 4232 | RestJson<L>,
|
4227 - | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4233 + | crate::operation_shape::HttpRequestWithFloatLabels,
|
4228 4234 | ModelPl::Output
|
4229 4235 | >
|
4230 4236 | >::Output
|
4231 4237 | >,
|
4232 4238 |
|
4233 4239 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4234 4240 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
4235 4241 |
|
4236 4242 | {
|
4237 4243 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
4238 4244 | use ::aws_smithy_http_server::plugin::Plugin;
|
4239 - | let svc = crate::operation_shape::HttpRequestWithRegexLiteral::from_handler(handler);
|
4245 + | let svc = crate::operation_shape::HttpRequestWithFloatLabels::from_handler(handler);
|
4240 4246 | let svc = self.model_plugin.apply(svc);
|
4241 4247 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4242 4248 | .apply(svc);
|
4243 4249 | let svc = self.http_plugin.apply(svc);
|
4244 - | self.http_request_with_regex_literal_custom(svc)
|
4250 + | self.http_request_with_float_labels_custom(svc)
|
4245 4251 | }
|
4246 4252 |
|
4247 - | /// Sets the [`HttpRequestWithRegexLiteral`](crate::operation_shape::HttpRequestWithRegexLiteral) operation.
|
4253 + | /// Sets the [`HttpRequestWithFloatLabels`](crate::operation_shape::HttpRequestWithFloatLabels) operation.
|
4248 4254 | ///
|
4249 4255 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
4250 4256 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
4251 4257 | ///
|
4252 4258 | /// # Example
|
4253 4259 | ///
|
4254 4260 | /// ```no_run
|
4255 4261 | /// use rest_json::{RestJson, RestJsonConfig};
|
4256 4262 | ///
|
4257 4263 | /// use rest_json::{input, output, error};
|
4258 4264 | ///
|
4259 - | /// async fn handler(input: input::HttpRequestWithRegexLiteralInput) -> Result<output::HttpRequestWithRegexLiteralOutput, error::HttpRequestWithRegexLiteralError> {
|
4265 + | /// async fn handler(input: input::HttpRequestWithFloatLabelsInput) -> Result<output::HttpRequestWithFloatLabelsOutput, error::HttpRequestWithFloatLabelsError> {
|
4260 4266 | /// todo!()
|
4261 4267 | /// }
|
4262 4268 | ///
|
4263 4269 | /// let config = RestJsonConfig::builder().build();
|
4264 4270 | /// let svc = ::tower::util::service_fn(handler);
|
4265 4271 | /// let app = RestJson::builder(config)
|
4266 - | /// .http_request_with_regex_literal_service(svc)
|
4272 + | /// .http_request_with_float_labels_service(svc)
|
4267 4273 | /// /* Set other handlers */
|
4268 4274 | /// .build()
|
4269 4275 | /// .unwrap();
|
4270 4276 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4271 4277 | /// ```
|
4272 4278 | ///
|
4273 - | pub fn http_request_with_regex_literal_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4279 + | pub fn http_request_with_float_labels_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4274 4280 | where
|
4275 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithRegexLiteral, ServiceExtractors>,
|
4281 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithFloatLabels, ServiceExtractors>,
|
4276 4282 |
|
4277 4283 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
4278 4284 | RestJson<L>,
|
4279 - | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4280 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithRegexLiteral, S>
|
4285 + | crate::operation_shape::HttpRequestWithFloatLabels,
|
4286 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithFloatLabels, S>
|
4281 4287 | >,
|
4282 4288 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
4283 4289 | RestJson<L>,
|
4284 - | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4290 + | crate::operation_shape::HttpRequestWithFloatLabels,
|
4285 4291 | ModelPl::Output
|
4286 4292 | >,
|
4287 4293 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
4288 4294 | RestJson<L>,
|
4289 - | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4295 + | crate::operation_shape::HttpRequestWithFloatLabels,
|
4290 4296 | <
|
4291 4297 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4292 4298 | as ::aws_smithy_http_server::plugin::Plugin<
|
4293 4299 | RestJson<L>,
|
4294 - | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4300 + | crate::operation_shape::HttpRequestWithFloatLabels,
|
4295 4301 | ModelPl::Output
|
4296 4302 | >
|
4297 4303 | >::Output
|
4298 4304 | >,
|
4299 4305 |
|
4300 4306 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4301 4307 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
4302 4308 |
|
4303 4309 | {
|
4304 4310 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
4305 4311 | use ::aws_smithy_http_server::plugin::Plugin;
|
4306 - | let svc = crate::operation_shape::HttpRequestWithRegexLiteral::from_service(service);
|
4312 + | let svc = crate::operation_shape::HttpRequestWithFloatLabels::from_service(service);
|
4307 4313 | let svc = self.model_plugin.apply(svc);
|
4308 4314 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4309 4315 | .apply(svc);
|
4310 4316 | let svc = self.http_plugin.apply(svc);
|
4311 - | self.http_request_with_regex_literal_custom(svc)
|
4317 + | self.http_request_with_float_labels_custom(svc)
|
4312 4318 | }
|
4313 4319 |
|
4314 - | /// Sets the [`HttpRequestWithRegexLiteral`](crate::operation_shape::HttpRequestWithRegexLiteral) to a custom [`Service`](tower::Service).
|
4320 + | /// Sets the [`HttpRequestWithFloatLabels`](crate::operation_shape::HttpRequestWithFloatLabels) to a custom [`Service`](tower::Service).
|
4315 4321 | /// not constrained by the Smithy contract.
|
4316 - | fn http_request_with_regex_literal_custom<S>(mut self, svc: S) -> Self
|
4322 + | fn http_request_with_float_labels_custom<S>(mut self, svc: S) -> Self
|
4317 4323 | where
|
4318 4324 | S: ::tower::Service<
|
4319 4325 | ::http_1x::Request<Body>,
|
4320 4326 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
4321 4327 | Error = ::std::convert::Infallible,
|
4322 4328 | > + Clone
|
4323 4329 | + Send
|
4324 4330 | + 'static,
|
4325 4331 | S::Future: Send + 'static,
|
4326 4332 | {
|
4327 - | self.http_request_with_regex_literal =
|
4333 + | self.http_request_with_float_labels =
|
4328 4334 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
4329 4335 | self
|
4330 4336 | }
|
4331 4337 |
|
4332 - | /// Sets the [`HttpResponseCode`](crate::operation_shape::HttpResponseCode) operation.
|
4338 + | /// Sets the [`HttpRequestWithGreedyLabelInPath`](crate::operation_shape::HttpRequestWithGreedyLabelInPath) operation.
|
4333 4339 | ///
|
4334 4340 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
4335 4341 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
4336 4342 | ///
|
4337 4343 | /// # Example
|
4338 4344 | ///
|
4339 4345 | /// ```no_run
|
4340 4346 | /// use rest_json::{RestJson, RestJsonConfig};
|
4341 4347 | ///
|
4342 4348 | /// use rest_json::{input, output, error};
|
4343 4349 | ///
|
4344 - | /// async fn handler(input: input::HttpResponseCodeInput) -> output::HttpResponseCodeOutput {
|
4350 + | /// async fn handler(input: input::HttpRequestWithGreedyLabelInPathInput) -> Result<output::HttpRequestWithGreedyLabelInPathOutput, error::HttpRequestWithGreedyLabelInPathError> {
|
4345 4351 | /// todo!()
|
4346 4352 | /// }
|
4347 4353 | ///
|
4348 4354 | /// let config = RestJsonConfig::builder().build();
|
4349 4355 | /// let app = RestJson::builder(config)
|
4350 - | /// .http_response_code(handler)
|
4356 + | /// .http_request_with_greedy_label_in_path(handler)
|
4351 4357 | /// /* Set other handlers */
|
4352 4358 | /// .build()
|
4353 4359 | /// .unwrap();
|
4354 4360 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4355 4361 | /// ```
|
4356 4362 | ///
|
4357 - | pub fn http_response_code<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4363 + | pub fn http_request_with_greedy_label_in_path<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4358 4364 | where
|
4359 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpResponseCode, HandlerExtractors>,
|
4365 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithGreedyLabelInPath, HandlerExtractors>,
|
4360 4366 |
|
4361 4367 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
4362 4368 | RestJson<L>,
|
4363 - | crate::operation_shape::HttpResponseCode,
|
4364 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpResponseCode, HandlerType>
|
4369 + | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
4370 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithGreedyLabelInPath, HandlerType>
|
4365 4371 | >,
|
4366 4372 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
4367 4373 | RestJson<L>,
|
4368 - | crate::operation_shape::HttpResponseCode,
|
4374 + | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
4369 4375 | ModelPl::Output
|
4370 4376 | >,
|
4371 4377 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
4372 4378 | RestJson<L>,
|
4373 - | crate::operation_shape::HttpResponseCode,
|
4379 + | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
4374 4380 | <
|
4375 4381 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4376 4382 | as ::aws_smithy_http_server::plugin::Plugin<
|
4377 4383 | RestJson<L>,
|
4378 - | crate::operation_shape::HttpResponseCode,
|
4384 + | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
4379 4385 | ModelPl::Output
|
4380 4386 | >
|
4381 4387 | >::Output
|
4382 4388 | >,
|
4383 4389 |
|
4384 4390 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4385 4391 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
4386 4392 |
|
4387 4393 | {
|
4388 4394 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
4389 4395 | use ::aws_smithy_http_server::plugin::Plugin;
|
4390 - | let svc = crate::operation_shape::HttpResponseCode::from_handler(handler);
|
4396 + | let svc = crate::operation_shape::HttpRequestWithGreedyLabelInPath::from_handler(handler);
|
4391 4397 | let svc = self.model_plugin.apply(svc);
|
4392 4398 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4393 4399 | .apply(svc);
|
4394 4400 | let svc = self.http_plugin.apply(svc);
|
4395 - | self.http_response_code_custom(svc)
|
4401 + | self.http_request_with_greedy_label_in_path_custom(svc)
|
4396 4402 | }
|
4397 4403 |
|
4398 - | /// Sets the [`HttpResponseCode`](crate::operation_shape::HttpResponseCode) operation.
|
4404 + | /// Sets the [`HttpRequestWithGreedyLabelInPath`](crate::operation_shape::HttpRequestWithGreedyLabelInPath) operation.
|
4399 4405 | ///
|
4400 4406 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
4401 4407 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
4402 4408 | ///
|
4403 4409 | /// # Example
|
4404 4410 | ///
|
4405 4411 | /// ```no_run
|
4406 4412 | /// use rest_json::{RestJson, RestJsonConfig};
|
4407 4413 | ///
|
4408 4414 | /// use rest_json::{input, output, error};
|
4409 4415 | ///
|
4410 - | /// async fn handler(input: input::HttpResponseCodeInput) -> Result<output::HttpResponseCodeOutput, std::convert::Infallible> {
|
4416 + | /// async fn handler(input: input::HttpRequestWithGreedyLabelInPathInput) -> Result<output::HttpRequestWithGreedyLabelInPathOutput, error::HttpRequestWithGreedyLabelInPathError> {
|
4411 4417 | /// todo!()
|
4412 4418 | /// }
|
4413 4419 | ///
|
4414 4420 | /// let config = RestJsonConfig::builder().build();
|
4415 4421 | /// let svc = ::tower::util::service_fn(handler);
|
4416 4422 | /// let app = RestJson::builder(config)
|
4417 - | /// .http_response_code_service(svc)
|
4423 + | /// .http_request_with_greedy_label_in_path_service(svc)
|
4418 4424 | /// /* Set other handlers */
|
4419 4425 | /// .build()
|
4420 4426 | /// .unwrap();
|
4421 4427 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4422 4428 | /// ```
|
4423 4429 | ///
|
4424 - | pub fn http_response_code_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4430 + | pub fn http_request_with_greedy_label_in_path_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4425 4431 | where
|
4426 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpResponseCode, ServiceExtractors>,
|
4432 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithGreedyLabelInPath, ServiceExtractors>,
|
4427 4433 |
|
4428 4434 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
4429 4435 | RestJson<L>,
|
4430 - | crate::operation_shape::HttpResponseCode,
|
4431 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpResponseCode, S>
|
4436 + | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
4437 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithGreedyLabelInPath, S>
|
4432 4438 | >,
|
4433 4439 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
4434 4440 | RestJson<L>,
|
4435 - | crate::operation_shape::HttpResponseCode,
|
4441 + | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
4436 4442 | ModelPl::Output
|
4437 4443 | >,
|
4438 4444 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
4439 4445 | RestJson<L>,
|
4440 - | crate::operation_shape::HttpResponseCode,
|
4446 + | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
4441 4447 | <
|
4442 4448 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4443 4449 | as ::aws_smithy_http_server::plugin::Plugin<
|
4444 4450 | RestJson<L>,
|
4445 - | crate::operation_shape::HttpResponseCode,
|
4451 + | crate::operation_shape::HttpRequestWithGreedyLabelInPath,
|
4446 4452 | ModelPl::Output
|
4447 4453 | >
|
4448 4454 | >::Output
|
4449 4455 | >,
|
4450 4456 |
|
4451 4457 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4452 4458 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
4453 4459 |
|
4454 4460 | {
|
4455 4461 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
4456 4462 | use ::aws_smithy_http_server::plugin::Plugin;
|
4457 - | let svc = crate::operation_shape::HttpResponseCode::from_service(service);
|
4463 + | let svc = crate::operation_shape::HttpRequestWithGreedyLabelInPath::from_service(service);
|
4458 4464 | let svc = self.model_plugin.apply(svc);
|
4459 4465 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4460 4466 | .apply(svc);
|
4461 4467 | let svc = self.http_plugin.apply(svc);
|
4462 - | self.http_response_code_custom(svc)
|
4468 + | self.http_request_with_greedy_label_in_path_custom(svc)
|
4463 4469 | }
|
4464 4470 |
|
4465 - | /// Sets the [`HttpResponseCode`](crate::operation_shape::HttpResponseCode) to a custom [`Service`](tower::Service).
|
4471 + | /// Sets the [`HttpRequestWithGreedyLabelInPath`](crate::operation_shape::HttpRequestWithGreedyLabelInPath) to a custom [`Service`](tower::Service).
|
4466 4472 | /// not constrained by the Smithy contract.
|
4467 - | fn http_response_code_custom<S>(mut self, svc: S) -> Self
|
4473 + | fn http_request_with_greedy_label_in_path_custom<S>(mut self, svc: S) -> Self
|
4468 4474 | where
|
4469 4475 | S: ::tower::Service<
|
4470 4476 | ::http_1x::Request<Body>,
|
4471 4477 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
4472 4478 | Error = ::std::convert::Infallible,
|
4473 4479 | > + Clone
|
4474 4480 | + Send
|
4475 4481 | + 'static,
|
4476 4482 | S::Future: Send + 'static,
|
4477 4483 | {
|
4478 - | self.http_response_code = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
4484 + | self.http_request_with_greedy_label_in_path =
|
4485 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
4479 4486 | self
|
4480 4487 | }
|
4481 4488 |
|
4482 - | /// Sets the [`HttpStringPayload`](crate::operation_shape::HttpStringPayload) operation.
|
4489 + | /// Sets the [`HttpRequestWithLabels`](crate::operation_shape::HttpRequestWithLabels) operation.
|
4483 4490 | ///
|
4484 4491 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
4485 4492 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
4486 4493 | ///
|
4487 4494 | /// # Example
|
4488 4495 | ///
|
4489 4496 | /// ```no_run
|
4490 4497 | /// use rest_json::{RestJson, RestJsonConfig};
|
4491 4498 | ///
|
4492 4499 | /// use rest_json::{input, output, error};
|
4493 4500 | ///
|
4494 - | /// async fn handler(input: input::HttpStringPayloadInput) -> output::HttpStringPayloadOutput {
|
4501 + | /// async fn handler(input: input::HttpRequestWithLabelsInput) -> Result<output::HttpRequestWithLabelsOutput, error::HttpRequestWithLabelsError> {
|
4495 4502 | /// todo!()
|
4496 4503 | /// }
|
4497 4504 | ///
|
4498 4505 | /// let config = RestJsonConfig::builder().build();
|
4499 4506 | /// let app = RestJson::builder(config)
|
4500 - | /// .http_string_payload(handler)
|
4507 + | /// .http_request_with_labels(handler)
|
4501 4508 | /// /* Set other handlers */
|
4502 4509 | /// .build()
|
4503 4510 | /// .unwrap();
|
4504 4511 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4505 4512 | /// ```
|
4506 4513 | ///
|
4507 - | pub fn http_string_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4514 + | pub fn http_request_with_labels<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4508 4515 | where
|
4509 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpStringPayload, HandlerExtractors>,
|
4516 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithLabels, HandlerExtractors>,
|
4510 4517 |
|
4511 4518 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
4512 4519 | RestJson<L>,
|
4513 - | crate::operation_shape::HttpStringPayload,
|
4514 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpStringPayload, HandlerType>
|
4520 + | crate::operation_shape::HttpRequestWithLabels,
|
4521 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithLabels, HandlerType>
|
4515 4522 | >,
|
4516 4523 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
4517 4524 | RestJson<L>,
|
4518 - | crate::operation_shape::HttpStringPayload,
|
4525 + | crate::operation_shape::HttpRequestWithLabels,
|
4519 4526 | ModelPl::Output
|
4520 4527 | >,
|
4521 4528 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
4522 4529 | RestJson<L>,
|
4523 - | crate::operation_shape::HttpStringPayload,
|
4530 + | crate::operation_shape::HttpRequestWithLabels,
|
4524 4531 | <
|
4525 4532 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4526 4533 | as ::aws_smithy_http_server::plugin::Plugin<
|
4527 4534 | RestJson<L>,
|
4528 - | crate::operation_shape::HttpStringPayload,
|
4535 + | crate::operation_shape::HttpRequestWithLabels,
|
4529 4536 | ModelPl::Output
|
4530 4537 | >
|
4531 4538 | >::Output
|
4532 4539 | >,
|
4533 4540 |
|
4534 4541 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4535 4542 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
4536 4543 |
|
4537 4544 | {
|
4538 4545 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
4539 4546 | use ::aws_smithy_http_server::plugin::Plugin;
|
4540 - | let svc = crate::operation_shape::HttpStringPayload::from_handler(handler);
|
4547 + | let svc = crate::operation_shape::HttpRequestWithLabels::from_handler(handler);
|
4541 4548 | let svc = self.model_plugin.apply(svc);
|
4542 4549 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4543 4550 | .apply(svc);
|
4544 4551 | let svc = self.http_plugin.apply(svc);
|
4545 - | self.http_string_payload_custom(svc)
|
4552 + | self.http_request_with_labels_custom(svc)
|
4546 4553 | }
|
4547 4554 |
|
4548 - | /// Sets the [`HttpStringPayload`](crate::operation_shape::HttpStringPayload) operation.
|
4555 + | /// Sets the [`HttpRequestWithLabels`](crate::operation_shape::HttpRequestWithLabels) operation.
|
4549 4556 | ///
|
4550 4557 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
4551 4558 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
4552 4559 | ///
|
4553 4560 | /// # Example
|
4554 4561 | ///
|
4555 4562 | /// ```no_run
|
4556 4563 | /// use rest_json::{RestJson, RestJsonConfig};
|
4557 4564 | ///
|
4558 4565 | /// use rest_json::{input, output, error};
|
4559 4566 | ///
|
4560 - | /// async fn handler(input: input::HttpStringPayloadInput) -> Result<output::HttpStringPayloadOutput, std::convert::Infallible> {
|
4567 + | /// async fn handler(input: input::HttpRequestWithLabelsInput) -> Result<output::HttpRequestWithLabelsOutput, error::HttpRequestWithLabelsError> {
|
4561 4568 | /// todo!()
|
4562 4569 | /// }
|
4563 4570 | ///
|
4564 4571 | /// let config = RestJsonConfig::builder().build();
|
4565 4572 | /// let svc = ::tower::util::service_fn(handler);
|
4566 4573 | /// let app = RestJson::builder(config)
|
4567 - | /// .http_string_payload_service(svc)
|
4574 + | /// .http_request_with_labels_service(svc)
|
4568 4575 | /// /* Set other handlers */
|
4569 4576 | /// .build()
|
4570 4577 | /// .unwrap();
|
4571 4578 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4572 4579 | /// ```
|
4573 4580 | ///
|
4574 - | pub fn http_string_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4581 + | pub fn http_request_with_labels_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4575 4582 | where
|
4576 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpStringPayload, ServiceExtractors>,
|
4583 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithLabels, ServiceExtractors>,
|
4577 4584 |
|
4578 4585 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
4579 4586 | RestJson<L>,
|
4580 - | crate::operation_shape::HttpStringPayload,
|
4581 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpStringPayload, S>
|
4587 + | crate::operation_shape::HttpRequestWithLabels,
|
4588 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithLabels, S>
|
4582 4589 | >,
|
4583 4590 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
4584 4591 | RestJson<L>,
|
4585 - | crate::operation_shape::HttpStringPayload,
|
4592 + | crate::operation_shape::HttpRequestWithLabels,
|
4586 4593 | ModelPl::Output
|
4587 4594 | >,
|
4588 4595 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
4589 4596 | RestJson<L>,
|
4590 - | crate::operation_shape::HttpStringPayload,
|
4597 + | crate::operation_shape::HttpRequestWithLabels,
|
4591 4598 | <
|
4592 4599 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4593 4600 | as ::aws_smithy_http_server::plugin::Plugin<
|
4594 4601 | RestJson<L>,
|
4595 - | crate::operation_shape::HttpStringPayload,
|
4602 + | crate::operation_shape::HttpRequestWithLabels,
|
4596 4603 | ModelPl::Output
|
4597 4604 | >
|
4598 4605 | >::Output
|
4599 4606 | >,
|
4600 4607 |
|
4601 4608 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4602 4609 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
4603 4610 |
|
4604 4611 | {
|
4605 4612 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
4606 4613 | use ::aws_smithy_http_server::plugin::Plugin;
|
4607 - | let svc = crate::operation_shape::HttpStringPayload::from_service(service);
|
4614 + | let svc = crate::operation_shape::HttpRequestWithLabels::from_service(service);
|
4608 4615 | let svc = self.model_plugin.apply(svc);
|
4609 4616 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4610 4617 | .apply(svc);
|
4611 4618 | let svc = self.http_plugin.apply(svc);
|
4612 - | self.http_string_payload_custom(svc)
|
4619 + | self.http_request_with_labels_custom(svc)
|
4613 4620 | }
|
4614 4621 |
|
4615 - | /// Sets the [`HttpStringPayload`](crate::operation_shape::HttpStringPayload) to a custom [`Service`](tower::Service).
|
4622 + | /// Sets the [`HttpRequestWithLabels`](crate::operation_shape::HttpRequestWithLabels) to a custom [`Service`](tower::Service).
|
4616 4623 | /// not constrained by the Smithy contract.
|
4617 - | fn http_string_payload_custom<S>(mut self, svc: S) -> Self
|
4624 + | fn http_request_with_labels_custom<S>(mut self, svc: S) -> Self
|
4618 4625 | where
|
4619 4626 | S: ::tower::Service<
|
4620 4627 | ::http_1x::Request<Body>,
|
4621 4628 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
4622 4629 | Error = ::std::convert::Infallible,
|
4623 4630 | > + Clone
|
4624 4631 | + Send
|
4625 4632 | + 'static,
|
4626 4633 | S::Future: Send + 'static,
|
4627 4634 | {
|
4628 - | self.http_string_payload = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
4635 + | self.http_request_with_labels = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
4629 4636 | self
|
4630 4637 | }
|
4631 4638 |
|
4632 - | /// Sets the [`IgnoreQueryParamsInResponse`](crate::operation_shape::IgnoreQueryParamsInResponse) operation.
|
4639 + | /// Sets the [`HttpRequestWithLabelsAndTimestampFormat`](crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat) operation.
|
4633 4640 | ///
|
4634 4641 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
4635 4642 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
4636 4643 | ///
|
4637 4644 | /// # Example
|
4638 4645 | ///
|
4639 4646 | /// ```no_run
|
4640 4647 | /// use rest_json::{RestJson, RestJsonConfig};
|
4641 4648 | ///
|
4642 4649 | /// use rest_json::{input, output, error};
|
4643 4650 | ///
|
4644 - | /// async fn handler(input: input::IgnoreQueryParamsInResponseInput) -> output::IgnoreQueryParamsInResponseOutput {
|
4651 + | /// async fn handler(input: input::HttpRequestWithLabelsAndTimestampFormatInput) -> Result<output::HttpRequestWithLabelsAndTimestampFormatOutput, error::HttpRequestWithLabelsAndTimestampFormatError> {
|
4645 4652 | /// todo!()
|
4646 4653 | /// }
|
4647 4654 | ///
|
4648 4655 | /// let config = RestJsonConfig::builder().build();
|
4649 4656 | /// let app = RestJson::builder(config)
|
4650 - | /// .ignore_query_params_in_response(handler)
|
4657 + | /// .http_request_with_labels_and_timestamp_format(handler)
|
4651 4658 | /// /* Set other handlers */
|
4652 4659 | /// .build()
|
4653 4660 | /// .unwrap();
|
4654 4661 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4655 4662 | /// ```
|
4656 4663 | ///
|
4657 - | pub fn ignore_query_params_in_response<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4664 + | pub fn http_request_with_labels_and_timestamp_format<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4658 4665 | where
|
4659 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::IgnoreQueryParamsInResponse, HandlerExtractors>,
|
4666 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat, HandlerExtractors>,
|
4660 4667 |
|
4661 4668 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
4662 4669 | RestJson<L>,
|
4663 - | crate::operation_shape::IgnoreQueryParamsInResponse,
|
4664 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::IgnoreQueryParamsInResponse, HandlerType>
|
4670 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4671 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat, HandlerType>
|
4665 4672 | >,
|
4666 4673 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
4667 4674 | RestJson<L>,
|
4668 - | crate::operation_shape::IgnoreQueryParamsInResponse,
|
4675 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4669 4676 | ModelPl::Output
|
4670 4677 | >,
|
4671 4678 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
4672 4679 | RestJson<L>,
|
4673 - | crate::operation_shape::IgnoreQueryParamsInResponse,
|
4680 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4674 4681 | <
|
4675 4682 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4676 4683 | as ::aws_smithy_http_server::plugin::Plugin<
|
4677 4684 | RestJson<L>,
|
4678 - | crate::operation_shape::IgnoreQueryParamsInResponse,
|
4685 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4679 4686 | ModelPl::Output
|
4680 4687 | >
|
4681 4688 | >::Output
|
4682 4689 | >,
|
4683 4690 |
|
4684 4691 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4685 4692 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
4686 4693 |
|
4687 4694 | {
|
4688 4695 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
4689 4696 | use ::aws_smithy_http_server::plugin::Plugin;
|
4690 - | let svc = crate::operation_shape::IgnoreQueryParamsInResponse::from_handler(handler);
|
4697 + | let svc =
|
4698 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat::from_handler(handler);
|
4691 4699 | let svc = self.model_plugin.apply(svc);
|
4692 4700 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4693 4701 | .apply(svc);
|
4694 4702 | let svc = self.http_plugin.apply(svc);
|
4695 - | self.ignore_query_params_in_response_custom(svc)
|
4703 + | self.http_request_with_labels_and_timestamp_format_custom(svc)
|
4696 4704 | }
|
4697 4705 |
|
4698 - | /// Sets the [`IgnoreQueryParamsInResponse`](crate::operation_shape::IgnoreQueryParamsInResponse) operation.
|
4706 + | /// Sets the [`HttpRequestWithLabelsAndTimestampFormat`](crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat) operation.
|
4699 4707 | ///
|
4700 4708 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
4701 4709 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
4702 4710 | ///
|
4703 4711 | /// # Example
|
4704 4712 | ///
|
4705 4713 | /// ```no_run
|
4706 4714 | /// use rest_json::{RestJson, RestJsonConfig};
|
4707 4715 | ///
|
4708 4716 | /// use rest_json::{input, output, error};
|
4709 4717 | ///
|
4710 - | /// async fn handler(input: input::IgnoreQueryParamsInResponseInput) -> Result<output::IgnoreQueryParamsInResponseOutput, std::convert::Infallible> {
|
4718 + | /// async fn handler(input: input::HttpRequestWithLabelsAndTimestampFormatInput) -> Result<output::HttpRequestWithLabelsAndTimestampFormatOutput, error::HttpRequestWithLabelsAndTimestampFormatError> {
|
4711 4719 | /// todo!()
|
4712 4720 | /// }
|
4713 4721 | ///
|
4714 4722 | /// let config = RestJsonConfig::builder().build();
|
4715 4723 | /// let svc = ::tower::util::service_fn(handler);
|
4716 4724 | /// let app = RestJson::builder(config)
|
4717 - | /// .ignore_query_params_in_response_service(svc)
|
4725 + | /// .http_request_with_labels_and_timestamp_format_service(svc)
|
4718 4726 | /// /* Set other handlers */
|
4719 4727 | /// .build()
|
4720 4728 | /// .unwrap();
|
4721 4729 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4722 4730 | /// ```
|
4723 4731 | ///
|
4724 - | pub fn ignore_query_params_in_response_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4732 + | pub fn http_request_with_labels_and_timestamp_format_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4725 4733 | where
|
4726 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::IgnoreQueryParamsInResponse, ServiceExtractors>,
|
4734 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat, ServiceExtractors>,
|
4727 4735 |
|
4728 4736 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
4729 4737 | RestJson<L>,
|
4730 - | crate::operation_shape::IgnoreQueryParamsInResponse,
|
4731 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::IgnoreQueryParamsInResponse, S>
|
4738 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4739 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat, S>
|
4732 4740 | >,
|
4733 4741 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
4734 4742 | RestJson<L>,
|
4735 - | crate::operation_shape::IgnoreQueryParamsInResponse,
|
4743 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4736 4744 | ModelPl::Output
|
4737 4745 | >,
|
4738 4746 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
4739 4747 | RestJson<L>,
|
4740 - | crate::operation_shape::IgnoreQueryParamsInResponse,
|
4748 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4741 4749 | <
|
4742 4750 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4743 4751 | as ::aws_smithy_http_server::plugin::Plugin<
|
4744 4752 | RestJson<L>,
|
4745 - | crate::operation_shape::IgnoreQueryParamsInResponse,
|
4753 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat,
|
4746 4754 | ModelPl::Output
|
4747 4755 | >
|
4748 4756 | >::Output
|
4749 4757 | >,
|
4750 4758 |
|
4751 4759 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4752 4760 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
4753 4761 |
|
4754 4762 | {
|
4755 4763 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
4756 4764 | use ::aws_smithy_http_server::plugin::Plugin;
|
4757 - | let svc = crate::operation_shape::IgnoreQueryParamsInResponse::from_service(service);
|
4765 + | let svc =
|
4766 + | crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat::from_service(service);
|
4758 4767 | let svc = self.model_plugin.apply(svc);
|
4759 4768 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4760 4769 | .apply(svc);
|
4761 4770 | let svc = self.http_plugin.apply(svc);
|
4762 - | self.ignore_query_params_in_response_custom(svc)
|
4771 + | self.http_request_with_labels_and_timestamp_format_custom(svc)
|
4763 4772 | }
|
4764 4773 |
|
4765 - | /// Sets the [`IgnoreQueryParamsInResponse`](crate::operation_shape::IgnoreQueryParamsInResponse) to a custom [`Service`](tower::Service).
|
4774 + | /// Sets the [`HttpRequestWithLabelsAndTimestampFormat`](crate::operation_shape::HttpRequestWithLabelsAndTimestampFormat) to a custom [`Service`](tower::Service).
|
4766 4775 | /// not constrained by the Smithy contract.
|
4767 - | fn ignore_query_params_in_response_custom<S>(mut self, svc: S) -> Self
|
4776 + | fn http_request_with_labels_and_timestamp_format_custom<S>(mut self, svc: S) -> Self
|
4768 4777 | where
|
4769 4778 | S: ::tower::Service<
|
4770 4779 | ::http_1x::Request<Body>,
|
4771 4780 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
4772 4781 | Error = ::std::convert::Infallible,
|
4773 4782 | > + Clone
|
4774 4783 | + Send
|
4775 4784 | + 'static,
|
4776 4785 | S::Future: Send + 'static,
|
4777 4786 | {
|
4778 - | self.ignore_query_params_in_response =
|
4787 + | self.http_request_with_labels_and_timestamp_format =
|
4779 4788 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
4780 4789 | self
|
4781 4790 | }
|
4782 4791 |
|
4783 - | /// Sets the [`InputAndOutputWithHeaders`](crate::operation_shape::InputAndOutputWithHeaders) operation.
|
4792 + | /// Sets the [`HttpRequestWithRegexLiteral`](crate::operation_shape::HttpRequestWithRegexLiteral) operation.
|
4784 4793 | ///
|
4785 4794 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
4786 4795 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
4787 4796 | ///
|
4788 4797 | /// # Example
|
4789 4798 | ///
|
4790 4799 | /// ```no_run
|
4791 4800 | /// use rest_json::{RestJson, RestJsonConfig};
|
4792 4801 | ///
|
4793 4802 | /// use rest_json::{input, output, error};
|
4794 4803 | ///
|
4795 - | /// async fn handler(input: input::InputAndOutputWithHeadersInput) -> Result<output::InputAndOutputWithHeadersOutput, error::InputAndOutputWithHeadersError> {
|
4804 + | /// async fn handler(input: input::HttpRequestWithRegexLiteralInput) -> Result<output::HttpRequestWithRegexLiteralOutput, error::HttpRequestWithRegexLiteralError> {
|
4796 4805 | /// todo!()
|
4797 4806 | /// }
|
4798 4807 | ///
|
4799 4808 | /// let config = RestJsonConfig::builder().build();
|
4800 4809 | /// let app = RestJson::builder(config)
|
4801 - | /// .input_and_output_with_headers(handler)
|
4810 + | /// .http_request_with_regex_literal(handler)
|
4802 4811 | /// /* Set other handlers */
|
4803 4812 | /// .build()
|
4804 4813 | /// .unwrap();
|
4805 4814 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4806 4815 | /// ```
|
4807 4816 | ///
|
4808 - | pub fn input_and_output_with_headers<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4817 + | pub fn http_request_with_regex_literal<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4809 4818 | where
|
4810 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::InputAndOutputWithHeaders, HandlerExtractors>,
|
4819 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpRequestWithRegexLiteral, HandlerExtractors>,
|
4811 4820 |
|
4812 4821 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
4813 4822 | RestJson<L>,
|
4814 - | crate::operation_shape::InputAndOutputWithHeaders,
|
4815 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::InputAndOutputWithHeaders, HandlerType>
|
4823 + | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4824 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpRequestWithRegexLiteral, HandlerType>
|
4816 4825 | >,
|
4817 4826 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
4818 4827 | RestJson<L>,
|
4819 - | crate::operation_shape::InputAndOutputWithHeaders,
|
4828 + | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4820 4829 | ModelPl::Output
|
4821 4830 | >,
|
4822 4831 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
4823 4832 | RestJson<L>,
|
4824 - | crate::operation_shape::InputAndOutputWithHeaders,
|
4833 + | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4825 4834 | <
|
4826 4835 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4827 4836 | as ::aws_smithy_http_server::plugin::Plugin<
|
4828 4837 | RestJson<L>,
|
4829 - | crate::operation_shape::InputAndOutputWithHeaders,
|
4838 + | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4830 4839 | ModelPl::Output
|
4831 4840 | >
|
4832 4841 | >::Output
|
4833 4842 | >,
|
4834 4843 |
|
4835 4844 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4836 4845 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
4837 4846 |
|
4838 4847 | {
|
4839 4848 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
4840 4849 | use ::aws_smithy_http_server::plugin::Plugin;
|
4841 - | let svc = crate::operation_shape::InputAndOutputWithHeaders::from_handler(handler);
|
4850 + | let svc = crate::operation_shape::HttpRequestWithRegexLiteral::from_handler(handler);
|
4842 4851 | let svc = self.model_plugin.apply(svc);
|
4843 4852 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4844 4853 | .apply(svc);
|
4845 4854 | let svc = self.http_plugin.apply(svc);
|
4846 - | self.input_and_output_with_headers_custom(svc)
|
4855 + | self.http_request_with_regex_literal_custom(svc)
|
4847 4856 | }
|
4848 4857 |
|
4849 - | /// Sets the [`InputAndOutputWithHeaders`](crate::operation_shape::InputAndOutputWithHeaders) operation.
|
4858 + | /// Sets the [`HttpRequestWithRegexLiteral`](crate::operation_shape::HttpRequestWithRegexLiteral) operation.
|
4850 4859 | ///
|
4851 4860 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
4852 4861 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
4853 4862 | ///
|
4854 4863 | /// # Example
|
4855 4864 | ///
|
4856 4865 | /// ```no_run
|
4857 4866 | /// use rest_json::{RestJson, RestJsonConfig};
|
4858 4867 | ///
|
4859 4868 | /// use rest_json::{input, output, error};
|
4860 4869 | ///
|
4861 - | /// async fn handler(input: input::InputAndOutputWithHeadersInput) -> Result<output::InputAndOutputWithHeadersOutput, error::InputAndOutputWithHeadersError> {
|
4870 + | /// async fn handler(input: input::HttpRequestWithRegexLiteralInput) -> Result<output::HttpRequestWithRegexLiteralOutput, error::HttpRequestWithRegexLiteralError> {
|
4862 4871 | /// todo!()
|
4863 4872 | /// }
|
4864 4873 | ///
|
4865 4874 | /// let config = RestJsonConfig::builder().build();
|
4866 4875 | /// let svc = ::tower::util::service_fn(handler);
|
4867 4876 | /// let app = RestJson::builder(config)
|
4868 - | /// .input_and_output_with_headers_service(svc)
|
4877 + | /// .http_request_with_regex_literal_service(svc)
|
4869 4878 | /// /* Set other handlers */
|
4870 4879 | /// .build()
|
4871 4880 | /// .unwrap();
|
4872 4881 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4873 4882 | /// ```
|
4874 4883 | ///
|
4875 - | pub fn input_and_output_with_headers_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4884 + | pub fn http_request_with_regex_literal_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
4876 4885 | where
|
4877 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::InputAndOutputWithHeaders, ServiceExtractors>,
|
4886 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpRequestWithRegexLiteral, ServiceExtractors>,
|
4878 4887 |
|
4879 4888 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
4880 4889 | RestJson<L>,
|
4881 - | crate::operation_shape::InputAndOutputWithHeaders,
|
4882 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::InputAndOutputWithHeaders, S>
|
4890 + | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4891 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpRequestWithRegexLiteral, S>
|
4883 4892 | >,
|
4884 4893 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
4885 4894 | RestJson<L>,
|
4886 - | crate::operation_shape::InputAndOutputWithHeaders,
|
4895 + | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4887 4896 | ModelPl::Output
|
4888 4897 | >,
|
4889 4898 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
4890 4899 | RestJson<L>,
|
4891 - | crate::operation_shape::InputAndOutputWithHeaders,
|
4900 + | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4892 4901 | <
|
4893 4902 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4894 4903 | as ::aws_smithy_http_server::plugin::Plugin<
|
4895 4904 | RestJson<L>,
|
4896 - | crate::operation_shape::InputAndOutputWithHeaders,
|
4905 + | crate::operation_shape::HttpRequestWithRegexLiteral,
|
4897 4906 | ModelPl::Output
|
4898 4907 | >
|
4899 4908 | >::Output
|
4900 4909 | >,
|
4901 4910 |
|
4902 4911 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4903 4912 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
4904 4913 |
|
4905 4914 | {
|
4906 4915 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
4907 4916 | use ::aws_smithy_http_server::plugin::Plugin;
|
4908 - | let svc = crate::operation_shape::InputAndOutputWithHeaders::from_service(service);
|
4917 + | let svc = crate::operation_shape::HttpRequestWithRegexLiteral::from_service(service);
|
4909 4918 | let svc = self.model_plugin.apply(svc);
|
4910 4919 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4911 4920 | .apply(svc);
|
4912 4921 | let svc = self.http_plugin.apply(svc);
|
4913 - | self.input_and_output_with_headers_custom(svc)
|
4922 + | self.http_request_with_regex_literal_custom(svc)
|
4914 4923 | }
|
4915 4924 |
|
4916 - | /// Sets the [`InputAndOutputWithHeaders`](crate::operation_shape::InputAndOutputWithHeaders) to a custom [`Service`](tower::Service).
|
4925 + | /// Sets the [`HttpRequestWithRegexLiteral`](crate::operation_shape::HttpRequestWithRegexLiteral) to a custom [`Service`](tower::Service).
|
4917 4926 | /// not constrained by the Smithy contract.
|
4918 - | fn input_and_output_with_headers_custom<S>(mut self, svc: S) -> Self
|
4927 + | fn http_request_with_regex_literal_custom<S>(mut self, svc: S) -> Self
|
4919 4928 | where
|
4920 4929 | S: ::tower::Service<
|
4921 4930 | ::http_1x::Request<Body>,
|
4922 4931 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
4923 4932 | Error = ::std::convert::Infallible,
|
4924 4933 | > + Clone
|
4925 4934 | + Send
|
4926 4935 | + 'static,
|
4927 4936 | S::Future: Send + 'static,
|
4928 4937 | {
|
4929 - | self.input_and_output_with_headers =
|
4938 + | self.http_request_with_regex_literal =
|
4930 4939 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
4931 4940 | self
|
4932 4941 | }
|
4933 4942 |
|
4934 - | /// Sets the [`JsonBlobs`](crate::operation_shape::JsonBlobs) operation.
|
4943 + | /// Sets the [`HttpResponseCode`](crate::operation_shape::HttpResponseCode) operation.
|
4935 4944 | ///
|
4936 4945 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
4937 4946 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
4938 4947 | ///
|
4939 4948 | /// # Example
|
4940 4949 | ///
|
4941 4950 | /// ```no_run
|
4942 4951 | /// use rest_json::{RestJson, RestJsonConfig};
|
4943 4952 | ///
|
4944 4953 | /// use rest_json::{input, output, error};
|
4945 4954 | ///
|
4946 - | /// async fn handler(input: input::JsonBlobsInput) -> output::JsonBlobsOutput {
|
4955 + | /// async fn handler(input: input::HttpResponseCodeInput) -> output::HttpResponseCodeOutput {
|
4947 4956 | /// todo!()
|
4948 4957 | /// }
|
4949 4958 | ///
|
4950 4959 | /// let config = RestJsonConfig::builder().build();
|
4951 4960 | /// let app = RestJson::builder(config)
|
4952 - | /// .json_blobs(handler)
|
4961 + | /// .http_response_code(handler)
|
4953 4962 | /// /* Set other handlers */
|
4954 4963 | /// .build()
|
4955 4964 | /// .unwrap();
|
4956 4965 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
4957 4966 | /// ```
|
4958 4967 | ///
|
4959 - | pub fn json_blobs<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4968 + | pub fn http_response_code<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
4960 4969 | where
|
4961 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::JsonBlobs, HandlerExtractors>,
|
4970 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpResponseCode, HandlerExtractors>,
|
4962 4971 |
|
4963 4972 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
4964 4973 | RestJson<L>,
|
4965 - | crate::operation_shape::JsonBlobs,
|
4966 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::JsonBlobs, HandlerType>
|
4974 + | crate::operation_shape::HttpResponseCode,
|
4975 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpResponseCode, HandlerType>
|
4967 4976 | >,
|
4968 4977 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
4969 4978 | RestJson<L>,
|
4970 - | crate::operation_shape::JsonBlobs,
|
4979 + | crate::operation_shape::HttpResponseCode,
|
4971 4980 | ModelPl::Output
|
4972 4981 | >,
|
4973 4982 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
4974 4983 | RestJson<L>,
|
4975 - | crate::operation_shape::JsonBlobs,
|
4984 + | crate::operation_shape::HttpResponseCode,
|
4976 4985 | <
|
4977 4986 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
4978 4987 | as ::aws_smithy_http_server::plugin::Plugin<
|
4979 4988 | RestJson<L>,
|
4980 - | crate::operation_shape::JsonBlobs,
|
4989 + | crate::operation_shape::HttpResponseCode,
|
4981 4990 | ModelPl::Output
|
4982 4991 | >
|
4983 4992 | >::Output
|
4984 4993 | >,
|
4985 4994 |
|
4986 4995 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
4987 4996 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
4988 4997 |
|
4989 4998 | {
|
4990 4999 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
4991 5000 | use ::aws_smithy_http_server::plugin::Plugin;
|
4992 - | let svc = crate::operation_shape::JsonBlobs::from_handler(handler);
|
5001 + | let svc = crate::operation_shape::HttpResponseCode::from_handler(handler);
|
4993 5002 | let svc = self.model_plugin.apply(svc);
|
4994 5003 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
4995 5004 | .apply(svc);
|
4996 5005 | let svc = self.http_plugin.apply(svc);
|
4997 - | self.json_blobs_custom(svc)
|
5006 + | self.http_response_code_custom(svc)
|
4998 5007 | }
|
4999 5008 |
|
5000 - | /// Sets the [`JsonBlobs`](crate::operation_shape::JsonBlobs) operation.
|
5009 + | /// Sets the [`HttpResponseCode`](crate::operation_shape::HttpResponseCode) operation.
|
5001 5010 | ///
|
5002 5011 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
5003 5012 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
5004 5013 | ///
|
5005 5014 | /// # Example
|
5006 5015 | ///
|
5007 5016 | /// ```no_run
|
5008 5017 | /// use rest_json::{RestJson, RestJsonConfig};
|
5009 5018 | ///
|
5010 5019 | /// use rest_json::{input, output, error};
|
5011 5020 | ///
|
5012 - | /// async fn handler(input: input::JsonBlobsInput) -> Result<output::JsonBlobsOutput, std::convert::Infallible> {
|
5021 + | /// async fn handler(input: input::HttpResponseCodeInput) -> Result<output::HttpResponseCodeOutput, std::convert::Infallible> {
|
5013 5022 | /// todo!()
|
5014 5023 | /// }
|
5015 5024 | ///
|
5016 5025 | /// let config = RestJsonConfig::builder().build();
|
5017 5026 | /// let svc = ::tower::util::service_fn(handler);
|
5018 5027 | /// let app = RestJson::builder(config)
|
5019 - | /// .json_blobs_service(svc)
|
5028 + | /// .http_response_code_service(svc)
|
5020 5029 | /// /* Set other handlers */
|
5021 5030 | /// .build()
|
5022 5031 | /// .unwrap();
|
5023 5032 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5024 5033 | /// ```
|
5025 5034 | ///
|
5026 - | pub fn json_blobs_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5035 + | pub fn http_response_code_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5027 5036 | where
|
5028 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::JsonBlobs, ServiceExtractors>,
|
5037 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpResponseCode, ServiceExtractors>,
|
5029 5038 |
|
5030 5039 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
5031 5040 | RestJson<L>,
|
5032 - | crate::operation_shape::JsonBlobs,
|
5033 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::JsonBlobs, S>
|
5041 + | crate::operation_shape::HttpResponseCode,
|
5042 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpResponseCode, S>
|
5034 5043 | >,
|
5035 5044 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
5036 5045 | RestJson<L>,
|
5037 - | crate::operation_shape::JsonBlobs,
|
5046 + | crate::operation_shape::HttpResponseCode,
|
5038 5047 | ModelPl::Output
|
5039 5048 | >,
|
5040 5049 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
5041 5050 | RestJson<L>,
|
5042 - | crate::operation_shape::JsonBlobs,
|
5051 + | crate::operation_shape::HttpResponseCode,
|
5043 5052 | <
|
5044 5053 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5045 5054 | as ::aws_smithy_http_server::plugin::Plugin<
|
5046 5055 | RestJson<L>,
|
5047 - | crate::operation_shape::JsonBlobs,
|
5056 + | crate::operation_shape::HttpResponseCode,
|
5048 5057 | ModelPl::Output
|
5049 5058 | >
|
5050 5059 | >::Output
|
5051 5060 | >,
|
5052 5061 |
|
5053 5062 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5054 5063 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
5055 5064 |
|
5056 5065 | {
|
5057 5066 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
5058 5067 | use ::aws_smithy_http_server::plugin::Plugin;
|
5059 - | let svc = crate::operation_shape::JsonBlobs::from_service(service);
|
5068 + | let svc = crate::operation_shape::HttpResponseCode::from_service(service);
|
5060 5069 | let svc = self.model_plugin.apply(svc);
|
5061 5070 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5062 5071 | .apply(svc);
|
5063 5072 | let svc = self.http_plugin.apply(svc);
|
5064 - | self.json_blobs_custom(svc)
|
5073 + | self.http_response_code_custom(svc)
|
5065 5074 | }
|
5066 5075 |
|
5067 - | /// Sets the [`JsonBlobs`](crate::operation_shape::JsonBlobs) to a custom [`Service`](tower::Service).
|
5076 + | /// Sets the [`HttpResponseCode`](crate::operation_shape::HttpResponseCode) to a custom [`Service`](tower::Service).
|
5068 5077 | /// not constrained by the Smithy contract.
|
5069 - | fn json_blobs_custom<S>(mut self, svc: S) -> Self
|
5078 + | fn http_response_code_custom<S>(mut self, svc: S) -> Self
|
5070 5079 | where
|
5071 5080 | S: ::tower::Service<
|
5072 5081 | ::http_1x::Request<Body>,
|
5073 5082 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
5074 5083 | Error = ::std::convert::Infallible,
|
5075 5084 | > + Clone
|
5076 5085 | + Send
|
5077 5086 | + 'static,
|
5078 5087 | S::Future: Send + 'static,
|
5079 5088 | {
|
5080 - | self.json_blobs = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
5089 + | self.http_response_code = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
5081 5090 | self
|
5082 5091 | }
|
5083 5092 |
|
5084 - | /// Sets the [`JsonEnums`](crate::operation_shape::JsonEnums) operation.
|
5093 + | /// Sets the [`HttpStringPayload`](crate::operation_shape::HttpStringPayload) operation.
|
5085 5094 | ///
|
5086 5095 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
5087 5096 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
5088 5097 | ///
|
5089 5098 | /// # Example
|
5090 5099 | ///
|
5091 5100 | /// ```no_run
|
5092 5101 | /// use rest_json::{RestJson, RestJsonConfig};
|
5093 5102 | ///
|
5094 5103 | /// use rest_json::{input, output, error};
|
5095 5104 | ///
|
5096 - | /// async fn handler(input: input::JsonEnumsInput) -> Result<output::JsonEnumsOutput, error::JsonEnumsError> {
|
5105 + | /// async fn handler(input: input::HttpStringPayloadInput) -> output::HttpStringPayloadOutput {
|
5097 5106 | /// todo!()
|
5098 5107 | /// }
|
5099 5108 | ///
|
5100 5109 | /// let config = RestJsonConfig::builder().build();
|
5101 5110 | /// let app = RestJson::builder(config)
|
5102 - | /// .json_enums(handler)
|
5111 + | /// .http_string_payload(handler)
|
5103 5112 | /// /* Set other handlers */
|
5104 5113 | /// .build()
|
5105 5114 | /// .unwrap();
|
5106 5115 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5107 5116 | /// ```
|
5108 5117 | ///
|
5109 - | pub fn json_enums<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5118 + | pub fn http_string_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5110 5119 | where
|
5111 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::JsonEnums, HandlerExtractors>,
|
5120 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpStringPayload, HandlerExtractors>,
|
5112 5121 |
|
5113 5122 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
5114 5123 | RestJson<L>,
|
5115 - | crate::operation_shape::JsonEnums,
|
5116 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::JsonEnums, HandlerType>
|
5124 + | crate::operation_shape::HttpStringPayload,
|
5125 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpStringPayload, HandlerType>
|
5117 5126 | >,
|
5118 5127 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
5119 5128 | RestJson<L>,
|
5120 - | crate::operation_shape::JsonEnums,
|
5129 + | crate::operation_shape::HttpStringPayload,
|
5121 5130 | ModelPl::Output
|
5122 5131 | >,
|
5123 5132 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
5124 5133 | RestJson<L>,
|
5125 - | crate::operation_shape::JsonEnums,
|
5134 + | crate::operation_shape::HttpStringPayload,
|
5126 5135 | <
|
5127 5136 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5128 5137 | as ::aws_smithy_http_server::plugin::Plugin<
|
5129 5138 | RestJson<L>,
|
5130 - | crate::operation_shape::JsonEnums,
|
5139 + | crate::operation_shape::HttpStringPayload,
|
5131 5140 | ModelPl::Output
|
5132 5141 | >
|
5133 5142 | >::Output
|
5134 5143 | >,
|
5135 5144 |
|
5136 5145 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5137 5146 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
5138 5147 |
|
5139 5148 | {
|
5140 5149 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
5141 5150 | use ::aws_smithy_http_server::plugin::Plugin;
|
5142 - | let svc = crate::operation_shape::JsonEnums::from_handler(handler);
|
5151 + | let svc = crate::operation_shape::HttpStringPayload::from_handler(handler);
|
5143 5152 | let svc = self.model_plugin.apply(svc);
|
5144 5153 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5145 5154 | .apply(svc);
|
5146 5155 | let svc = self.http_plugin.apply(svc);
|
5147 - | self.json_enums_custom(svc)
|
5156 + | self.http_string_payload_custom(svc)
|
5148 5157 | }
|
5149 5158 |
|
5150 - | /// Sets the [`JsonEnums`](crate::operation_shape::JsonEnums) operation.
|
5159 + | /// Sets the [`HttpStringPayload`](crate::operation_shape::HttpStringPayload) operation.
|
5151 5160 | ///
|
5152 5161 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
5153 5162 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
5154 5163 | ///
|
5155 5164 | /// # Example
|
5156 5165 | ///
|
5157 5166 | /// ```no_run
|
5158 5167 | /// use rest_json::{RestJson, RestJsonConfig};
|
5159 5168 | ///
|
5160 5169 | /// use rest_json::{input, output, error};
|
5161 5170 | ///
|
5162 - | /// async fn handler(input: input::JsonEnumsInput) -> Result<output::JsonEnumsOutput, error::JsonEnumsError> {
|
5171 + | /// async fn handler(input: input::HttpStringPayloadInput) -> Result<output::HttpStringPayloadOutput, std::convert::Infallible> {
|
5163 5172 | /// todo!()
|
5164 5173 | /// }
|
5165 5174 | ///
|
5166 5175 | /// let config = RestJsonConfig::builder().build();
|
5167 5176 | /// let svc = ::tower::util::service_fn(handler);
|
5168 5177 | /// let app = RestJson::builder(config)
|
5169 - | /// .json_enums_service(svc)
|
5178 + | /// .http_string_payload_service(svc)
|
5170 5179 | /// /* Set other handlers */
|
5171 5180 | /// .build()
|
5172 5181 | /// .unwrap();
|
5173 5182 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5174 5183 | /// ```
|
5175 5184 | ///
|
5176 - | pub fn json_enums_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5185 + | pub fn http_string_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5177 5186 | where
|
5178 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::JsonEnums, ServiceExtractors>,
|
5187 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpStringPayload, ServiceExtractors>,
|
5179 5188 |
|
5180 5189 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
5181 5190 | RestJson<L>,
|
5182 - | crate::operation_shape::JsonEnums,
|
5183 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::JsonEnums, S>
|
5191 + | crate::operation_shape::HttpStringPayload,
|
5192 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpStringPayload, S>
|
5184 5193 | >,
|
5185 5194 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
5186 5195 | RestJson<L>,
|
5187 - | crate::operation_shape::JsonEnums,
|
5196 + | crate::operation_shape::HttpStringPayload,
|
5188 5197 | ModelPl::Output
|
5189 5198 | >,
|
5190 5199 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
5191 5200 | RestJson<L>,
|
5192 - | crate::operation_shape::JsonEnums,
|
5201 + | crate::operation_shape::HttpStringPayload,
|
5193 5202 | <
|
5194 5203 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5195 5204 | as ::aws_smithy_http_server::plugin::Plugin<
|
5196 5205 | RestJson<L>,
|
5197 - | crate::operation_shape::JsonEnums,
|
5206 + | crate::operation_shape::HttpStringPayload,
|
5198 5207 | ModelPl::Output
|
5199 5208 | >
|
5200 5209 | >::Output
|
5201 5210 | >,
|
5202 5211 |
|
5203 5212 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5204 5213 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
5205 5214 |
|
5206 5215 | {
|
5207 5216 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
5208 5217 | use ::aws_smithy_http_server::plugin::Plugin;
|
5209 - | let svc = crate::operation_shape::JsonEnums::from_service(service);
|
5218 + | let svc = crate::operation_shape::HttpStringPayload::from_service(service);
|
5210 5219 | let svc = self.model_plugin.apply(svc);
|
5211 5220 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5212 5221 | .apply(svc);
|
5213 5222 | let svc = self.http_plugin.apply(svc);
|
5214 - | self.json_enums_custom(svc)
|
5223 + | self.http_string_payload_custom(svc)
|
5215 5224 | }
|
5216 5225 |
|
5217 - | /// Sets the [`JsonEnums`](crate::operation_shape::JsonEnums) to a custom [`Service`](tower::Service).
|
5226 + | /// Sets the [`HttpStringPayload`](crate::operation_shape::HttpStringPayload) to a custom [`Service`](tower::Service).
|
5218 5227 | /// not constrained by the Smithy contract.
|
5219 - | fn json_enums_custom<S>(mut self, svc: S) -> Self
|
5228 + | fn http_string_payload_custom<S>(mut self, svc: S) -> Self
|
5220 5229 | where
|
5221 5230 | S: ::tower::Service<
|
5222 5231 | ::http_1x::Request<Body>,
|
5223 5232 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
5224 5233 | Error = ::std::convert::Infallible,
|
5225 5234 | > + Clone
|
5226 5235 | + Send
|
5227 5236 | + 'static,
|
5228 5237 | S::Future: Send + 'static,
|
5229 5238 | {
|
5230 - | self.json_enums = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
5239 + | self.http_string_payload = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
5231 5240 | self
|
5232 5241 | }
|
5233 5242 |
|
5234 - | /// Sets the [`JsonIntEnums`](crate::operation_shape::JsonIntEnums) operation.
|
5243 + | /// Sets the [`IgnoreQueryParamsInResponse`](crate::operation_shape::IgnoreQueryParamsInResponse) operation.
|
5235 5244 | ///
|
5236 5245 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
5237 5246 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
5238 5247 | ///
|
5239 5248 | /// # Example
|
5240 5249 | ///
|
5241 5250 | /// ```no_run
|
5242 5251 | /// use rest_json::{RestJson, RestJsonConfig};
|
5243 5252 | ///
|
5244 5253 | /// use rest_json::{input, output, error};
|
5245 5254 | ///
|
5246 - | /// async fn handler(input: input::JsonIntEnumsInput) -> Result<output::JsonIntEnumsOutput, error::JsonIntEnumsError> {
|
5255 + | /// async fn handler(input: input::IgnoreQueryParamsInResponseInput) -> output::IgnoreQueryParamsInResponseOutput {
|
5247 5256 | /// todo!()
|
5248 5257 | /// }
|
5249 5258 | ///
|
5250 5259 | /// let config = RestJsonConfig::builder().build();
|
5251 5260 | /// let app = RestJson::builder(config)
|
5252 - | /// .json_int_enums(handler)
|
5261 + | /// .ignore_query_params_in_response(handler)
|
5253 5262 | /// /* Set other handlers */
|
5254 5263 | /// .build()
|
5255 5264 | /// .unwrap();
|
5256 5265 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5257 5266 | /// ```
|
5258 5267 | ///
|
5259 - | pub fn json_int_enums<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5268 + | pub fn ignore_query_params_in_response<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5260 5269 | where
|
5261 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::JsonIntEnums, HandlerExtractors>,
|
5270 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::IgnoreQueryParamsInResponse, HandlerExtractors>,
|
5262 5271 |
|
5263 5272 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
5264 5273 | RestJson<L>,
|
5265 - | crate::operation_shape::JsonIntEnums,
|
5266 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::JsonIntEnums, HandlerType>
|
5274 + | crate::operation_shape::IgnoreQueryParamsInResponse,
|
5275 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::IgnoreQueryParamsInResponse, HandlerType>
|
5267 5276 | >,
|
5268 5277 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
5269 5278 | RestJson<L>,
|
5270 - | crate::operation_shape::JsonIntEnums,
|
5279 + | crate::operation_shape::IgnoreQueryParamsInResponse,
|
5271 5280 | ModelPl::Output
|
5272 5281 | >,
|
5273 5282 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
5274 5283 | RestJson<L>,
|
5275 - | crate::operation_shape::JsonIntEnums,
|
5284 + | crate::operation_shape::IgnoreQueryParamsInResponse,
|
5276 5285 | <
|
5277 5286 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5278 5287 | as ::aws_smithy_http_server::plugin::Plugin<
|
5279 5288 | RestJson<L>,
|
5280 - | crate::operation_shape::JsonIntEnums,
|
5289 + | crate::operation_shape::IgnoreQueryParamsInResponse,
|
5281 5290 | ModelPl::Output
|
5282 5291 | >
|
5283 5292 | >::Output
|
5284 5293 | >,
|
5285 5294 |
|
5286 5295 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5287 5296 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
5288 5297 |
|
5289 5298 | {
|
5290 5299 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
5291 5300 | use ::aws_smithy_http_server::plugin::Plugin;
|
5292 - | let svc = crate::operation_shape::JsonIntEnums::from_handler(handler);
|
5301 + | let svc = crate::operation_shape::IgnoreQueryParamsInResponse::from_handler(handler);
|
5293 5302 | let svc = self.model_plugin.apply(svc);
|
5294 5303 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5295 5304 | .apply(svc);
|
5296 5305 | let svc = self.http_plugin.apply(svc);
|
5297 - | self.json_int_enums_custom(svc)
|
5306 + | self.ignore_query_params_in_response_custom(svc)
|
5298 5307 | }
|
5299 5308 |
|
5300 - | /// Sets the [`JsonIntEnums`](crate::operation_shape::JsonIntEnums) operation.
|
5309 + | /// Sets the [`IgnoreQueryParamsInResponse`](crate::operation_shape::IgnoreQueryParamsInResponse) operation.
|
5301 5310 | ///
|
5302 5311 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
5303 5312 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
5304 5313 | ///
|
5305 5314 | /// # Example
|
5306 5315 | ///
|
5307 5316 | /// ```no_run
|
5308 5317 | /// use rest_json::{RestJson, RestJsonConfig};
|
5309 5318 | ///
|
5310 5319 | /// use rest_json::{input, output, error};
|
5311 5320 | ///
|
5312 - | /// async fn handler(input: input::JsonIntEnumsInput) -> Result<output::JsonIntEnumsOutput, error::JsonIntEnumsError> {
|
5321 + | /// async fn handler(input: input::IgnoreQueryParamsInResponseInput) -> Result<output::IgnoreQueryParamsInResponseOutput, std::convert::Infallible> {
|
5313 5322 | /// todo!()
|
5314 5323 | /// }
|
5315 5324 | ///
|
5316 5325 | /// let config = RestJsonConfig::builder().build();
|
5317 5326 | /// let svc = ::tower::util::service_fn(handler);
|
5318 5327 | /// let app = RestJson::builder(config)
|
5319 - | /// .json_int_enums_service(svc)
|
5328 + | /// .ignore_query_params_in_response_service(svc)
|
5320 5329 | /// /* Set other handlers */
|
5321 5330 | /// .build()
|
5322 5331 | /// .unwrap();
|
5323 5332 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5324 5333 | /// ```
|
5325 5334 | ///
|
5326 - | pub fn json_int_enums_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5335 + | pub fn ignore_query_params_in_response_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5327 5336 | where
|
5328 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::JsonIntEnums, ServiceExtractors>,
|
5337 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::IgnoreQueryParamsInResponse, ServiceExtractors>,
|
5329 5338 |
|
5330 5339 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
5331 5340 | RestJson<L>,
|
5332 - | crate::operation_shape::JsonIntEnums,
|
5333 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::JsonIntEnums, S>
|
5341 + | crate::operation_shape::IgnoreQueryParamsInResponse,
|
5342 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::IgnoreQueryParamsInResponse, S>
|
5334 5343 | >,
|
5335 5344 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
5336 5345 | RestJson<L>,
|
5337 - | crate::operation_shape::JsonIntEnums,
|
5346 + | crate::operation_shape::IgnoreQueryParamsInResponse,
|
5338 5347 | ModelPl::Output
|
5339 5348 | >,
|
5340 5349 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
5341 5350 | RestJson<L>,
|
5342 - | crate::operation_shape::JsonIntEnums,
|
5351 + | crate::operation_shape::IgnoreQueryParamsInResponse,
|
5343 5352 | <
|
5344 5353 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5345 5354 | as ::aws_smithy_http_server::plugin::Plugin<
|
5346 5355 | RestJson<L>,
|
5347 - | crate::operation_shape::JsonIntEnums,
|
5356 + | crate::operation_shape::IgnoreQueryParamsInResponse,
|
5348 5357 | ModelPl::Output
|
5349 5358 | >
|
5350 5359 | >::Output
|
5351 5360 | >,
|
5352 5361 |
|
5353 5362 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5354 5363 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
5355 5364 |
|
5356 5365 | {
|
5357 5366 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
5358 5367 | use ::aws_smithy_http_server::plugin::Plugin;
|
5359 - | let svc = crate::operation_shape::JsonIntEnums::from_service(service);
|
5368 + | let svc = crate::operation_shape::IgnoreQueryParamsInResponse::from_service(service);
|
5360 5369 | let svc = self.model_plugin.apply(svc);
|
5361 5370 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5362 5371 | .apply(svc);
|
5363 5372 | let svc = self.http_plugin.apply(svc);
|
5364 - | self.json_int_enums_custom(svc)
|
5373 + | self.ignore_query_params_in_response_custom(svc)
|
5365 5374 | }
|
5366 5375 |
|
5367 - | /// Sets the [`JsonIntEnums`](crate::operation_shape::JsonIntEnums) to a custom [`Service`](tower::Service).
|
5376 + | /// Sets the [`IgnoreQueryParamsInResponse`](crate::operation_shape::IgnoreQueryParamsInResponse) to a custom [`Service`](tower::Service).
|
5368 5377 | /// not constrained by the Smithy contract.
|
5369 - | fn json_int_enums_custom<S>(mut self, svc: S) -> Self
|
5378 + | fn ignore_query_params_in_response_custom<S>(mut self, svc: S) -> Self
|
5370 5379 | where
|
5371 5380 | S: ::tower::Service<
|
5372 5381 | ::http_1x::Request<Body>,
|
5373 5382 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
5374 5383 | Error = ::std::convert::Infallible,
|
5375 5384 | > + Clone
|
5376 5385 | + Send
|
5377 5386 | + 'static,
|
5378 5387 | S::Future: Send + 'static,
|
5379 5388 | {
|
5380 - | self.json_int_enums = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
5389 + | self.ignore_query_params_in_response =
|
5390 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
5381 5391 | self
|
5382 5392 | }
|
5383 5393 |
|
5384 - | /// Sets the [`JsonLists`](crate::operation_shape::JsonLists) operation.
|
5394 + | /// Sets the [`InputAndOutputWithHeaders`](crate::operation_shape::InputAndOutputWithHeaders) operation.
|
5385 5395 | ///
|
5386 5396 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
5387 5397 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
5388 5398 | ///
|
5389 5399 | /// # Example
|
5390 5400 | ///
|
5391 5401 | /// ```no_run
|
5392 5402 | /// use rest_json::{RestJson, RestJsonConfig};
|
5393 5403 | ///
|
5394 5404 | /// use rest_json::{input, output, error};
|
5395 5405 | ///
|
5396 - | /// async fn handler(input: input::JsonListsInput) -> Result<output::JsonListsOutput, error::JsonListsError> {
|
5406 + | /// async fn handler(input: input::InputAndOutputWithHeadersInput) -> Result<output::InputAndOutputWithHeadersOutput, error::InputAndOutputWithHeadersError> {
|
5397 5407 | /// todo!()
|
5398 5408 | /// }
|
5399 5409 | ///
|
5400 5410 | /// let config = RestJsonConfig::builder().build();
|
5401 5411 | /// let app = RestJson::builder(config)
|
5402 - | /// .json_lists(handler)
|
5412 + | /// .input_and_output_with_headers(handler)
|
5403 5413 | /// /* Set other handlers */
|
5404 5414 | /// .build()
|
5405 5415 | /// .unwrap();
|
5406 5416 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5407 5417 | /// ```
|
5408 5418 | ///
|
5409 - | pub fn json_lists<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5419 + | pub fn input_and_output_with_headers<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5410 5420 | where
|
5411 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::JsonLists, HandlerExtractors>,
|
5421 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::InputAndOutputWithHeaders, HandlerExtractors>,
|
5412 5422 |
|
5413 5423 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
5414 5424 | RestJson<L>,
|
5415 - | crate::operation_shape::JsonLists,
|
5416 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::JsonLists, HandlerType>
|
5425 + | crate::operation_shape::InputAndOutputWithHeaders,
|
5426 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::InputAndOutputWithHeaders, HandlerType>
|
5417 5427 | >,
|
5418 5428 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
5419 5429 | RestJson<L>,
|
5420 - | crate::operation_shape::JsonLists,
|
5430 + | crate::operation_shape::InputAndOutputWithHeaders,
|
5421 5431 | ModelPl::Output
|
5422 5432 | >,
|
5423 5433 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
5424 5434 | RestJson<L>,
|
5425 - | crate::operation_shape::JsonLists,
|
5435 + | crate::operation_shape::InputAndOutputWithHeaders,
|
5426 5436 | <
|
5427 5437 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5428 5438 | as ::aws_smithy_http_server::plugin::Plugin<
|
5429 5439 | RestJson<L>,
|
5430 - | crate::operation_shape::JsonLists,
|
5440 + | crate::operation_shape::InputAndOutputWithHeaders,
|
5431 5441 | ModelPl::Output
|
5432 5442 | >
|
5433 5443 | >::Output
|
5434 5444 | >,
|
5435 5445 |
|
5436 5446 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5437 5447 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
5438 5448 |
|
5439 5449 | {
|
5440 5450 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
5441 5451 | use ::aws_smithy_http_server::plugin::Plugin;
|
5442 - | let svc = crate::operation_shape::JsonLists::from_handler(handler);
|
5452 + | let svc = crate::operation_shape::InputAndOutputWithHeaders::from_handler(handler);
|
5443 5453 | let svc = self.model_plugin.apply(svc);
|
5444 5454 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5445 5455 | .apply(svc);
|
5446 5456 | let svc = self.http_plugin.apply(svc);
|
5447 - | self.json_lists_custom(svc)
|
5457 + | self.input_and_output_with_headers_custom(svc)
|
5448 5458 | }
|
5449 5459 |
|
5450 - | /// Sets the [`JsonLists`](crate::operation_shape::JsonLists) operation.
|
5460 + | /// Sets the [`InputAndOutputWithHeaders`](crate::operation_shape::InputAndOutputWithHeaders) operation.
|
5451 5461 | ///
|
5452 5462 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
5453 5463 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
5454 5464 | ///
|
5455 5465 | /// # Example
|
5456 5466 | ///
|
5457 5467 | /// ```no_run
|
5458 5468 | /// use rest_json::{RestJson, RestJsonConfig};
|
5459 5469 | ///
|
5460 5470 | /// use rest_json::{input, output, error};
|
5461 5471 | ///
|
5462 - | /// async fn handler(input: input::JsonListsInput) -> Result<output::JsonListsOutput, error::JsonListsError> {
|
5472 + | /// async fn handler(input: input::InputAndOutputWithHeadersInput) -> Result<output::InputAndOutputWithHeadersOutput, error::InputAndOutputWithHeadersError> {
|
5463 5473 | /// todo!()
|
5464 5474 | /// }
|
5465 5475 | ///
|
5466 5476 | /// let config = RestJsonConfig::builder().build();
|
5467 5477 | /// let svc = ::tower::util::service_fn(handler);
|
5468 5478 | /// let app = RestJson::builder(config)
|
5469 - | /// .json_lists_service(svc)
|
5479 + | /// .input_and_output_with_headers_service(svc)
|
5470 5480 | /// /* Set other handlers */
|
5471 5481 | /// .build()
|
5472 5482 | /// .unwrap();
|
5473 5483 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5474 5484 | /// ```
|
5475 5485 | ///
|
5476 - | pub fn json_lists_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5486 + | pub fn input_and_output_with_headers_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5477 5487 | where
|
5478 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::JsonLists, ServiceExtractors>,
|
5488 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::InputAndOutputWithHeaders, ServiceExtractors>,
|
5479 5489 |
|
5480 5490 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
5481 5491 | RestJson<L>,
|
5482 - | crate::operation_shape::JsonLists,
|
5483 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::JsonLists, S>
|
5492 + | crate::operation_shape::InputAndOutputWithHeaders,
|
5493 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::InputAndOutputWithHeaders, S>
|
5484 5494 | >,
|
5485 5495 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
5486 5496 | RestJson<L>,
|
5487 - | crate::operation_shape::JsonLists,
|
5497 + | crate::operation_shape::InputAndOutputWithHeaders,
|
5488 5498 | ModelPl::Output
|
5489 5499 | >,
|
5490 5500 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
5491 5501 | RestJson<L>,
|
5492 - | crate::operation_shape::JsonLists,
|
5502 + | crate::operation_shape::InputAndOutputWithHeaders,
|
5493 5503 | <
|
5494 5504 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5495 5505 | as ::aws_smithy_http_server::plugin::Plugin<
|
5496 5506 | RestJson<L>,
|
5497 - | crate::operation_shape::JsonLists,
|
5507 + | crate::operation_shape::InputAndOutputWithHeaders,
|
5498 5508 | ModelPl::Output
|
5499 5509 | >
|
5500 5510 | >::Output
|
5501 5511 | >,
|
5502 5512 |
|
5503 5513 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5504 5514 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
5505 5515 |
|
5506 5516 | {
|
5507 5517 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
5508 5518 | use ::aws_smithy_http_server::plugin::Plugin;
|
5509 - | let svc = crate::operation_shape::JsonLists::from_service(service);
|
5519 + | let svc = crate::operation_shape::InputAndOutputWithHeaders::from_service(service);
|
5510 5520 | let svc = self.model_plugin.apply(svc);
|
5511 5521 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5512 5522 | .apply(svc);
|
5513 5523 | let svc = self.http_plugin.apply(svc);
|
5514 - | self.json_lists_custom(svc)
|
5524 + | self.input_and_output_with_headers_custom(svc)
|
5515 5525 | }
|
5516 5526 |
|
5517 - | /// Sets the [`JsonLists`](crate::operation_shape::JsonLists) to a custom [`Service`](tower::Service).
|
5527 + | /// Sets the [`InputAndOutputWithHeaders`](crate::operation_shape::InputAndOutputWithHeaders) to a custom [`Service`](tower::Service).
|
5518 5528 | /// not constrained by the Smithy contract.
|
5519 - | fn json_lists_custom<S>(mut self, svc: S) -> Self
|
5529 + | fn input_and_output_with_headers_custom<S>(mut self, svc: S) -> Self
|
5520 5530 | where
|
5521 5531 | S: ::tower::Service<
|
5522 5532 | ::http_1x::Request<Body>,
|
5523 5533 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
5524 5534 | Error = ::std::convert::Infallible,
|
5525 5535 | > + Clone
|
5526 5536 | + Send
|
5527 5537 | + 'static,
|
5528 5538 | S::Future: Send + 'static,
|
5529 5539 | {
|
5530 - | self.json_lists = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
5540 + | self.input_and_output_with_headers =
|
5541 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
5531 5542 | self
|
5532 5543 | }
|
5533 5544 |
|
5534 - | /// Sets the [`JsonMaps`](crate::operation_shape::JsonMaps) operation.
|
5545 + | /// Sets the [`InputStream`](crate::operation_shape::InputStream) operation.
|
5535 5546 | ///
|
5536 5547 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
5537 5548 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
5538 5549 | ///
|
5539 5550 | /// # Example
|
5540 5551 | ///
|
5541 5552 | /// ```no_run
|
5542 5553 | /// use rest_json::{RestJson, RestJsonConfig};
|
5543 5554 | ///
|
5544 5555 | /// use rest_json::{input, output, error};
|
5545 5556 | ///
|
5546 - | /// async fn handler(input: input::JsonMapsInput) -> Result<output::JsonMapsOutput, error::JsonMapsError> {
|
5557 + | /// async fn handler(input: input::InputStreamInput) -> Result<output::InputStreamOutput, error::InputStreamError> {
|
5547 5558 | /// todo!()
|
5548 5559 | /// }
|
5549 5560 | ///
|
5550 5561 | /// let config = RestJsonConfig::builder().build();
|
5551 5562 | /// let app = RestJson::builder(config)
|
5552 - | /// .json_maps(handler)
|
5563 + | /// .input_stream(handler)
|
5553 5564 | /// /* Set other handlers */
|
5554 5565 | /// .build()
|
5555 5566 | /// .unwrap();
|
5556 5567 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5557 5568 | /// ```
|
5558 5569 | ///
|
5559 - | pub fn json_maps<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5570 + | pub fn input_stream<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5560 5571 | where
|
5561 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::JsonMaps, HandlerExtractors>,
|
5572 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::InputStream, HandlerExtractors>,
|
5562 5573 |
|
5563 5574 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
5564 5575 | RestJson<L>,
|
5565 - | crate::operation_shape::JsonMaps,
|
5566 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::JsonMaps, HandlerType>
|
5576 + | crate::operation_shape::InputStream,
|
5577 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::InputStream, HandlerType>
|
5567 5578 | >,
|
5568 5579 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
5569 5580 | RestJson<L>,
|
5570 - | crate::operation_shape::JsonMaps,
|
5581 + | crate::operation_shape::InputStream,
|
5571 5582 | ModelPl::Output
|
5572 5583 | >,
|
5573 5584 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
5574 5585 | RestJson<L>,
|
5575 - | crate::operation_shape::JsonMaps,
|
5586 + | crate::operation_shape::InputStream,
|
5576 5587 | <
|
5577 5588 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5578 5589 | as ::aws_smithy_http_server::plugin::Plugin<
|
5579 5590 | RestJson<L>,
|
5580 - | crate::operation_shape::JsonMaps,
|
5591 + | crate::operation_shape::InputStream,
|
5581 5592 | ModelPl::Output
|
5582 5593 | >
|
5583 5594 | >::Output
|
5584 5595 | >,
|
5585 5596 |
|
5586 5597 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5587 5598 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
5588 5599 |
|
5589 5600 | {
|
5590 5601 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
5591 5602 | use ::aws_smithy_http_server::plugin::Plugin;
|
5592 - | let svc = crate::operation_shape::JsonMaps::from_handler(handler);
|
5603 + | let svc = crate::operation_shape::InputStream::from_handler(handler);
|
5593 5604 | let svc = self.model_plugin.apply(svc);
|
5594 5605 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5595 5606 | .apply(svc);
|
5596 5607 | let svc = self.http_plugin.apply(svc);
|
5597 - | self.json_maps_custom(svc)
|
5608 + | self.input_stream_custom(svc)
|
5598 5609 | }
|
5599 5610 |
|
5600 - | /// Sets the [`JsonMaps`](crate::operation_shape::JsonMaps) operation.
|
5611 + | /// Sets the [`InputStream`](crate::operation_shape::InputStream) operation.
|
5601 5612 | ///
|
5602 5613 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
5603 5614 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
5604 5615 | ///
|
5605 5616 | /// # Example
|
5606 5617 | ///
|
5607 5618 | /// ```no_run
|
5608 5619 | /// use rest_json::{RestJson, RestJsonConfig};
|
5609 5620 | ///
|
5610 5621 | /// use rest_json::{input, output, error};
|
5611 5622 | ///
|
5612 - | /// async fn handler(input: input::JsonMapsInput) -> Result<output::JsonMapsOutput, error::JsonMapsError> {
|
5623 + | /// async fn handler(input: input::InputStreamInput) -> Result<output::InputStreamOutput, error::InputStreamError> {
|
5613 5624 | /// todo!()
|
5614 5625 | /// }
|
5615 5626 | ///
|
5616 5627 | /// let config = RestJsonConfig::builder().build();
|
5617 5628 | /// let svc = ::tower::util::service_fn(handler);
|
5618 5629 | /// let app = RestJson::builder(config)
|
5619 - | /// .json_maps_service(svc)
|
5630 + | /// .input_stream_service(svc)
|
5620 5631 | /// /* Set other handlers */
|
5621 5632 | /// .build()
|
5622 5633 | /// .unwrap();
|
5623 5634 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5624 5635 | /// ```
|
5625 5636 | ///
|
5626 - | pub fn json_maps_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5637 + | pub fn input_stream_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5627 5638 | where
|
5628 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::JsonMaps, ServiceExtractors>,
|
5639 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::InputStream, ServiceExtractors>,
|
5629 5640 |
|
5630 5641 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
5631 5642 | RestJson<L>,
|
5632 - | crate::operation_shape::JsonMaps,
|
5633 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::JsonMaps, S>
|
5643 + | crate::operation_shape::InputStream,
|
5644 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::InputStream, S>
|
5634 5645 | >,
|
5635 5646 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
5636 5647 | RestJson<L>,
|
5637 - | crate::operation_shape::JsonMaps,
|
5648 + | crate::operation_shape::InputStream,
|
5638 5649 | ModelPl::Output
|
5639 5650 | >,
|
5640 5651 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
5641 5652 | RestJson<L>,
|
5642 - | crate::operation_shape::JsonMaps,
|
5653 + | crate::operation_shape::InputStream,
|
5643 5654 | <
|
5644 5655 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5645 5656 | as ::aws_smithy_http_server::plugin::Plugin<
|
5646 5657 | RestJson<L>,
|
5647 - | crate::operation_shape::JsonMaps,
|
5658 + | crate::operation_shape::InputStream,
|
5648 5659 | ModelPl::Output
|
5649 5660 | >
|
5650 5661 | >::Output
|
5651 5662 | >,
|
5652 5663 |
|
5653 5664 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5654 5665 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
5655 5666 |
|
5656 5667 | {
|
5657 5668 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
5658 5669 | use ::aws_smithy_http_server::plugin::Plugin;
|
5659 - | let svc = crate::operation_shape::JsonMaps::from_service(service);
|
5670 + | let svc = crate::operation_shape::InputStream::from_service(service);
|
5660 5671 | let svc = self.model_plugin.apply(svc);
|
5661 5672 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5662 5673 | .apply(svc);
|
5663 5674 | let svc = self.http_plugin.apply(svc);
|
5664 - | self.json_maps_custom(svc)
|
5675 + | self.input_stream_custom(svc)
|
5665 5676 | }
|
5666 5677 |
|
5667 - | /// Sets the [`JsonMaps`](crate::operation_shape::JsonMaps) to a custom [`Service`](tower::Service).
|
5678 + | /// Sets the [`InputStream`](crate::operation_shape::InputStream) to a custom [`Service`](tower::Service).
|
5668 5679 | /// not constrained by the Smithy contract.
|
5669 - | fn json_maps_custom<S>(mut self, svc: S) -> Self
|
5680 + | fn input_stream_custom<S>(mut self, svc: S) -> Self
|
5670 5681 | where
|
5671 5682 | S: ::tower::Service<
|
5672 5683 | ::http_1x::Request<Body>,
|
5673 5684 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
5674 5685 | Error = ::std::convert::Infallible,
|
5675 5686 | > + Clone
|
5676 5687 | + Send
|
5677 5688 | + 'static,
|
5678 5689 | S::Future: Send + 'static,
|
5679 5690 | {
|
5680 - | self.json_maps = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
5691 + | self.input_stream = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
5681 5692 | self
|
5682 5693 | }
|
5683 5694 |
|
5684 - | /// Sets the [`JsonTimestamps`](crate::operation_shape::JsonTimestamps) operation.
|
5695 + | /// Sets the [`InputStreamWithInitialRequest`](crate::operation_shape::InputStreamWithInitialRequest) operation.
|
5685 5696 | ///
|
5686 5697 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
5687 5698 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
5688 5699 | ///
|
5689 5700 | /// # Example
|
5690 5701 | ///
|
5691 5702 | /// ```no_run
|
5692 5703 | /// use rest_json::{RestJson, RestJsonConfig};
|
5693 5704 | ///
|
5694 5705 | /// use rest_json::{input, output, error};
|
5695 5706 | ///
|
5696 - | /// async fn handler(input: input::JsonTimestampsInput) -> output::JsonTimestampsOutput {
|
5707 + | /// async fn handler(input: input::InputStreamWithInitialRequestInput) -> Result<output::InputStreamWithInitialRequestOutput, error::InputStreamWithInitialRequestError> {
|
5697 5708 | /// todo!()
|
5698 5709 | /// }
|
5699 5710 | ///
|
5700 5711 | /// let config = RestJsonConfig::builder().build();
|
5701 5712 | /// let app = RestJson::builder(config)
|
5702 - | /// .json_timestamps(handler)
|
5713 + | /// .input_stream_with_initial_request(handler)
|
5703 5714 | /// /* Set other handlers */
|
5704 5715 | /// .build()
|
5705 5716 | /// .unwrap();
|
5706 5717 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5707 5718 | /// ```
|
5708 5719 | ///
|
5709 - | pub fn json_timestamps<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5720 + | pub fn input_stream_with_initial_request<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5710 5721 | where
|
5711 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::JsonTimestamps, HandlerExtractors>,
|
5722 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::InputStreamWithInitialRequest, HandlerExtractors>,
|
5712 5723 |
|
5713 5724 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
5714 5725 | RestJson<L>,
|
5715 - | crate::operation_shape::JsonTimestamps,
|
5716 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::JsonTimestamps, HandlerType>
|
5726 + | crate::operation_shape::InputStreamWithInitialRequest,
|
5727 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::InputStreamWithInitialRequest, HandlerType>
|
5717 5728 | >,
|
5718 5729 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
5719 5730 | RestJson<L>,
|
5720 - | crate::operation_shape::JsonTimestamps,
|
5731 + | crate::operation_shape::InputStreamWithInitialRequest,
|
5721 5732 | ModelPl::Output
|
5722 5733 | >,
|
5723 5734 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
5724 5735 | RestJson<L>,
|
5725 - | crate::operation_shape::JsonTimestamps,
|
5736 + | crate::operation_shape::InputStreamWithInitialRequest,
|
5726 5737 | <
|
5727 5738 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5728 5739 | as ::aws_smithy_http_server::plugin::Plugin<
|
5729 5740 | RestJson<L>,
|
5730 - | crate::operation_shape::JsonTimestamps,
|
5741 + | crate::operation_shape::InputStreamWithInitialRequest,
|
5731 5742 | ModelPl::Output
|
5732 5743 | >
|
5733 5744 | >::Output
|
5734 5745 | >,
|
5735 5746 |
|
5736 5747 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5737 5748 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
5738 5749 |
|
5739 5750 | {
|
5740 5751 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
5741 5752 | use ::aws_smithy_http_server::plugin::Plugin;
|
5742 - | let svc = crate::operation_shape::JsonTimestamps::from_handler(handler);
|
5753 + | let svc = crate::operation_shape::InputStreamWithInitialRequest::from_handler(handler);
|
5743 5754 | let svc = self.model_plugin.apply(svc);
|
5744 5755 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5745 5756 | .apply(svc);
|
5746 5757 | let svc = self.http_plugin.apply(svc);
|
5747 - | self.json_timestamps_custom(svc)
|
5758 + | self.input_stream_with_initial_request_custom(svc)
|
5748 5759 | }
|
5749 5760 |
|
5750 - | /// Sets the [`JsonTimestamps`](crate::operation_shape::JsonTimestamps) operation.
|
5761 + | /// Sets the [`InputStreamWithInitialRequest`](crate::operation_shape::InputStreamWithInitialRequest) operation.
|
5751 5762 | ///
|
5752 5763 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
5753 5764 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
5754 5765 | ///
|
5755 5766 | /// # Example
|
5756 5767 | ///
|
5757 5768 | /// ```no_run
|
5758 5769 | /// use rest_json::{RestJson, RestJsonConfig};
|
5759 5770 | ///
|
5760 5771 | /// use rest_json::{input, output, error};
|
5761 5772 | ///
|
5762 - | /// async fn handler(input: input::JsonTimestampsInput) -> Result<output::JsonTimestampsOutput, std::convert::Infallible> {
|
5773 + | /// async fn handler(input: input::InputStreamWithInitialRequestInput) -> Result<output::InputStreamWithInitialRequestOutput, error::InputStreamWithInitialRequestError> {
|
5763 5774 | /// todo!()
|
5764 5775 | /// }
|
5765 5776 | ///
|
5766 5777 | /// let config = RestJsonConfig::builder().build();
|
5767 5778 | /// let svc = ::tower::util::service_fn(handler);
|
5768 5779 | /// let app = RestJson::builder(config)
|
5769 - | /// .json_timestamps_service(svc)
|
5780 + | /// .input_stream_with_initial_request_service(svc)
|
5770 5781 | /// /* Set other handlers */
|
5771 5782 | /// .build()
|
5772 5783 | /// .unwrap();
|
5773 5784 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5774 5785 | /// ```
|
5775 5786 | ///
|
5776 - | pub fn json_timestamps_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5787 + | pub fn input_stream_with_initial_request_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5777 5788 | where
|
5778 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::JsonTimestamps, ServiceExtractors>,
|
5789 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::InputStreamWithInitialRequest, ServiceExtractors>,
|
5779 5790 |
|
5780 5791 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
5781 5792 | RestJson<L>,
|
5782 - | crate::operation_shape::JsonTimestamps,
|
5783 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::JsonTimestamps, S>
|
5793 + | crate::operation_shape::InputStreamWithInitialRequest,
|
5794 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::InputStreamWithInitialRequest, S>
|
5784 5795 | >,
|
5785 5796 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
5786 5797 | RestJson<L>,
|
5787 - | crate::operation_shape::JsonTimestamps,
|
5798 + | crate::operation_shape::InputStreamWithInitialRequest,
|
5788 5799 | ModelPl::Output
|
5789 5800 | >,
|
5790 5801 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
5791 5802 | RestJson<L>,
|
5792 - | crate::operation_shape::JsonTimestamps,
|
5803 + | crate::operation_shape::InputStreamWithInitialRequest,
|
5793 5804 | <
|
5794 5805 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5795 5806 | as ::aws_smithy_http_server::plugin::Plugin<
|
5796 5807 | RestJson<L>,
|
5797 - | crate::operation_shape::JsonTimestamps,
|
5808 + | crate::operation_shape::InputStreamWithInitialRequest,
|
5798 5809 | ModelPl::Output
|
5799 5810 | >
|
5800 5811 | >::Output
|
5801 5812 | >,
|
5802 5813 |
|
5803 5814 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5804 5815 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
5805 5816 |
|
5806 5817 | {
|
5807 5818 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
5808 5819 | use ::aws_smithy_http_server::plugin::Plugin;
|
5809 - | let svc = crate::operation_shape::JsonTimestamps::from_service(service);
|
5820 + | let svc = crate::operation_shape::InputStreamWithInitialRequest::from_service(service);
|
5810 5821 | let svc = self.model_plugin.apply(svc);
|
5811 5822 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5812 5823 | .apply(svc);
|
5813 5824 | let svc = self.http_plugin.apply(svc);
|
5814 - | self.json_timestamps_custom(svc)
|
5825 + | self.input_stream_with_initial_request_custom(svc)
|
5815 5826 | }
|
5816 5827 |
|
5817 - | /// Sets the [`JsonTimestamps`](crate::operation_shape::JsonTimestamps) to a custom [`Service`](tower::Service).
|
5828 + | /// Sets the [`InputStreamWithInitialRequest`](crate::operation_shape::InputStreamWithInitialRequest) to a custom [`Service`](tower::Service).
|
5818 5829 | /// not constrained by the Smithy contract.
|
5819 - | fn json_timestamps_custom<S>(mut self, svc: S) -> Self
|
5830 + | fn input_stream_with_initial_request_custom<S>(mut self, svc: S) -> Self
|
5820 5831 | where
|
5821 5832 | S: ::tower::Service<
|
5822 5833 | ::http_1x::Request<Body>,
|
5823 5834 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
5824 5835 | Error = ::std::convert::Infallible,
|
5825 5836 | > + Clone
|
5826 5837 | + Send
|
5827 5838 | + 'static,
|
5828 5839 | S::Future: Send + 'static,
|
5829 5840 | {
|
5830 - | self.json_timestamps = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
5841 + | self.input_stream_with_initial_request =
|
5842 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
5831 5843 | self
|
5832 5844 | }
|
5833 5845 |
|
5834 - | /// Sets the [`JsonUnions`](crate::operation_shape::JsonUnions) operation.
|
5846 + | /// Sets the [`JsonBlobs`](crate::operation_shape::JsonBlobs) operation.
|
5835 5847 | ///
|
5836 5848 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
5837 5849 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
5838 5850 | ///
|
5839 5851 | /// # Example
|
5840 5852 | ///
|
5841 5853 | /// ```no_run
|
5842 5854 | /// use rest_json::{RestJson, RestJsonConfig};
|
5843 5855 | ///
|
5844 5856 | /// use rest_json::{input, output, error};
|
5845 5857 | ///
|
5846 - | /// async fn handler(input: input::JsonUnionsInput) -> Result<output::JsonUnionsOutput, error::JsonUnionsError> {
|
5858 + | /// async fn handler(input: input::JsonBlobsInput) -> output::JsonBlobsOutput {
|
5847 5859 | /// todo!()
|
5848 5860 | /// }
|
5849 5861 | ///
|
5850 5862 | /// let config = RestJsonConfig::builder().build();
|
5851 5863 | /// let app = RestJson::builder(config)
|
5852 - | /// .json_unions(handler)
|
5864 + | /// .json_blobs(handler)
|
5853 5865 | /// /* Set other handlers */
|
5854 5866 | /// .build()
|
5855 5867 | /// .unwrap();
|
5856 5868 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5857 5869 | /// ```
|
5858 5870 | ///
|
5859 - | pub fn json_unions<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5871 + | pub fn json_blobs<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
5860 5872 | where
|
5861 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::JsonUnions, HandlerExtractors>,
|
5873 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::JsonBlobs, HandlerExtractors>,
|
5862 5874 |
|
5863 5875 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
5864 5876 | RestJson<L>,
|
5865 - | crate::operation_shape::JsonUnions,
|
5866 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::JsonUnions, HandlerType>
|
5877 + | crate::operation_shape::JsonBlobs,
|
5878 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::JsonBlobs, HandlerType>
|
5867 5879 | >,
|
5868 5880 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
5869 5881 | RestJson<L>,
|
5870 - | crate::operation_shape::JsonUnions,
|
5882 + | crate::operation_shape::JsonBlobs,
|
5871 5883 | ModelPl::Output
|
5872 5884 | >,
|
5873 5885 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
5874 5886 | RestJson<L>,
|
5875 - | crate::operation_shape::JsonUnions,
|
5887 + | crate::operation_shape::JsonBlobs,
|
5876 5888 | <
|
5877 5889 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5878 5890 | as ::aws_smithy_http_server::plugin::Plugin<
|
5879 5891 | RestJson<L>,
|
5880 - | crate::operation_shape::JsonUnions,
|
5892 + | crate::operation_shape::JsonBlobs,
|
5881 5893 | ModelPl::Output
|
5882 5894 | >
|
5883 5895 | >::Output
|
5884 5896 | >,
|
5885 5897 |
|
5886 5898 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5887 5899 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
5888 5900 |
|
5889 5901 | {
|
5890 5902 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
5891 5903 | use ::aws_smithy_http_server::plugin::Plugin;
|
5892 - | let svc = crate::operation_shape::JsonUnions::from_handler(handler);
|
5904 + | let svc = crate::operation_shape::JsonBlobs::from_handler(handler);
|
5893 5905 | let svc = self.model_plugin.apply(svc);
|
5894 5906 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5895 5907 | .apply(svc);
|
5896 5908 | let svc = self.http_plugin.apply(svc);
|
5897 - | self.json_unions_custom(svc)
|
5909 + | self.json_blobs_custom(svc)
|
5898 5910 | }
|
5899 5911 |
|
5900 - | /// Sets the [`JsonUnions`](crate::operation_shape::JsonUnions) operation.
|
5912 + | /// Sets the [`JsonBlobs`](crate::operation_shape::JsonBlobs) operation.
|
5901 5913 | ///
|
5902 5914 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
5903 5915 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
5904 5916 | ///
|
5905 5917 | /// # Example
|
5906 5918 | ///
|
5907 5919 | /// ```no_run
|
5908 5920 | /// use rest_json::{RestJson, RestJsonConfig};
|
5909 5921 | ///
|
5910 5922 | /// use rest_json::{input, output, error};
|
5911 5923 | ///
|
5912 - | /// async fn handler(input: input::JsonUnionsInput) -> Result<output::JsonUnionsOutput, error::JsonUnionsError> {
|
5924 + | /// async fn handler(input: input::JsonBlobsInput) -> Result<output::JsonBlobsOutput, std::convert::Infallible> {
|
5913 5925 | /// todo!()
|
5914 5926 | /// }
|
5915 5927 | ///
|
5916 5928 | /// let config = RestJsonConfig::builder().build();
|
5917 5929 | /// let svc = ::tower::util::service_fn(handler);
|
5918 5930 | /// let app = RestJson::builder(config)
|
5919 - | /// .json_unions_service(svc)
|
5931 + | /// .json_blobs_service(svc)
|
5920 5932 | /// /* Set other handlers */
|
5921 5933 | /// .build()
|
5922 5934 | /// .unwrap();
|
5923 5935 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
5924 5936 | /// ```
|
5925 5937 | ///
|
5926 - | pub fn json_unions_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5938 + | pub fn json_blobs_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
5927 5939 | where
|
5928 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::JsonUnions, ServiceExtractors>,
|
5940 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::JsonBlobs, ServiceExtractors>,
|
5929 5941 |
|
5930 5942 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
5931 5943 | RestJson<L>,
|
5932 - | crate::operation_shape::JsonUnions,
|
5933 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::JsonUnions, S>
|
5944 + | crate::operation_shape::JsonBlobs,
|
5945 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::JsonBlobs, S>
|
5934 5946 | >,
|
5935 5947 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
5936 5948 | RestJson<L>,
|
5937 - | crate::operation_shape::JsonUnions,
|
5949 + | crate::operation_shape::JsonBlobs,
|
5938 5950 | ModelPl::Output
|
5939 5951 | >,
|
5940 5952 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
5941 5953 | RestJson<L>,
|
5942 - | crate::operation_shape::JsonUnions,
|
5954 + | crate::operation_shape::JsonBlobs,
|
5943 5955 | <
|
5944 5956 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
5945 5957 | as ::aws_smithy_http_server::plugin::Plugin<
|
5946 5958 | RestJson<L>,
|
5947 - | crate::operation_shape::JsonUnions,
|
5959 + | crate::operation_shape::JsonBlobs,
|
5948 5960 | ModelPl::Output
|
5949 5961 | >
|
5950 5962 | >::Output
|
5951 5963 | >,
|
5952 5964 |
|
5953 5965 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
5954 5966 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
5955 5967 |
|
5956 5968 | {
|
5957 5969 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
5958 5970 | use ::aws_smithy_http_server::plugin::Plugin;
|
5959 - | let svc = crate::operation_shape::JsonUnions::from_service(service);
|
5971 + | let svc = crate::operation_shape::JsonBlobs::from_service(service);
|
5960 5972 | let svc = self.model_plugin.apply(svc);
|
5961 5973 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
5962 5974 | .apply(svc);
|
5963 5975 | let svc = self.http_plugin.apply(svc);
|
5964 - | self.json_unions_custom(svc)
|
5976 + | self.json_blobs_custom(svc)
|
5965 5977 | }
|
5966 5978 |
|
5967 - | /// Sets the [`JsonUnions`](crate::operation_shape::JsonUnions) to a custom [`Service`](tower::Service).
|
5979 + | /// Sets the [`JsonBlobs`](crate::operation_shape::JsonBlobs) to a custom [`Service`](tower::Service).
|
5968 5980 | /// not constrained by the Smithy contract.
|
5969 - | fn json_unions_custom<S>(mut self, svc: S) -> Self
|
5981 + | fn json_blobs_custom<S>(mut self, svc: S) -> Self
|
5970 5982 | where
|
5971 5983 | S: ::tower::Service<
|
5972 5984 | ::http_1x::Request<Body>,
|
5973 5985 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
5974 5986 | Error = ::std::convert::Infallible,
|
5975 5987 | > + Clone
|
5976 5988 | + Send
|
5977 5989 | + 'static,
|
5978 5990 | S::Future: Send + 'static,
|
5979 5991 | {
|
5980 - | self.json_unions = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
5992 + | self.json_blobs = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
5981 5993 | self
|
5982 5994 | }
|
5983 5995 |
|
5984 - | /// Sets the [`MalformedAcceptWithBody`](crate::operation_shape::MalformedAcceptWithBody) operation.
|
5996 + | /// Sets the [`JsonEnums`](crate::operation_shape::JsonEnums) operation.
|
5985 5997 | ///
|
5986 5998 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
5987 5999 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
5988 6000 | ///
|
5989 6001 | /// # Example
|
5990 6002 | ///
|
5991 6003 | /// ```no_run
|
5992 6004 | /// use rest_json::{RestJson, RestJsonConfig};
|
5993 6005 | ///
|
5994 6006 | /// use rest_json::{input, output, error};
|
5995 6007 | ///
|
5996 - | /// async fn handler(input: input::MalformedAcceptWithBodyInput) -> output::MalformedAcceptWithBodyOutput {
|
6008 + | /// async fn handler(input: input::JsonEnumsInput) -> Result<output::JsonEnumsOutput, error::JsonEnumsError> {
|
5997 6009 | /// todo!()
|
5998 6010 | /// }
|
5999 6011 | ///
|
6000 6012 | /// let config = RestJsonConfig::builder().build();
|
6001 6013 | /// let app = RestJson::builder(config)
|
6002 - | /// .malformed_accept_with_body(handler)
|
6014 + | /// .json_enums(handler)
|
6003 6015 | /// /* Set other handlers */
|
6004 6016 | /// .build()
|
6005 6017 | /// .unwrap();
|
6006 6018 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6007 6019 | /// ```
|
6008 6020 | ///
|
6009 - | pub fn malformed_accept_with_body<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6021 + | pub fn json_enums<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6010 6022 | where
|
6011 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedAcceptWithBody, HandlerExtractors>,
|
6023 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::JsonEnums, HandlerExtractors>,
|
6012 6024 |
|
6013 6025 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6014 6026 | RestJson<L>,
|
6015 - | crate::operation_shape::MalformedAcceptWithBody,
|
6016 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedAcceptWithBody, HandlerType>
|
6027 + | crate::operation_shape::JsonEnums,
|
6028 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::JsonEnums, HandlerType>
|
6017 6029 | >,
|
6018 6030 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6019 6031 | RestJson<L>,
|
6020 - | crate::operation_shape::MalformedAcceptWithBody,
|
6032 + | crate::operation_shape::JsonEnums,
|
6021 6033 | ModelPl::Output
|
6022 6034 | >,
|
6023 6035 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6024 6036 | RestJson<L>,
|
6025 - | crate::operation_shape::MalformedAcceptWithBody,
|
6037 + | crate::operation_shape::JsonEnums,
|
6026 6038 | <
|
6027 6039 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6028 6040 | as ::aws_smithy_http_server::plugin::Plugin<
|
6029 6041 | RestJson<L>,
|
6030 - | crate::operation_shape::MalformedAcceptWithBody,
|
6042 + | crate::operation_shape::JsonEnums,
|
6031 6043 | ModelPl::Output
|
6032 6044 | >
|
6033 6045 | >::Output
|
6034 6046 | >,
|
6035 6047 |
|
6036 6048 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6037 6049 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6038 6050 |
|
6039 6051 | {
|
6040 6052 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6041 6053 | use ::aws_smithy_http_server::plugin::Plugin;
|
6042 - | let svc = crate::operation_shape::MalformedAcceptWithBody::from_handler(handler);
|
6054 + | let svc = crate::operation_shape::JsonEnums::from_handler(handler);
|
6043 6055 | let svc = self.model_plugin.apply(svc);
|
6044 6056 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6045 6057 | .apply(svc);
|
6046 6058 | let svc = self.http_plugin.apply(svc);
|
6047 - | self.malformed_accept_with_body_custom(svc)
|
6059 + | self.json_enums_custom(svc)
|
6048 6060 | }
|
6049 6061 |
|
6050 - | /// Sets the [`MalformedAcceptWithBody`](crate::operation_shape::MalformedAcceptWithBody) operation.
|
6062 + | /// Sets the [`JsonEnums`](crate::operation_shape::JsonEnums) operation.
|
6051 6063 | ///
|
6052 6064 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6053 6065 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6054 6066 | ///
|
6055 6067 | /// # Example
|
6056 6068 | ///
|
6057 6069 | /// ```no_run
|
6058 6070 | /// use rest_json::{RestJson, RestJsonConfig};
|
6059 6071 | ///
|
6060 6072 | /// use rest_json::{input, output, error};
|
6061 6073 | ///
|
6062 - | /// async fn handler(input: input::MalformedAcceptWithBodyInput) -> Result<output::MalformedAcceptWithBodyOutput, std::convert::Infallible> {
|
6074 + | /// async fn handler(input: input::JsonEnumsInput) -> Result<output::JsonEnumsOutput, error::JsonEnumsError> {
|
6063 6075 | /// todo!()
|
6064 6076 | /// }
|
6065 6077 | ///
|
6066 6078 | /// let config = RestJsonConfig::builder().build();
|
6067 6079 | /// let svc = ::tower::util::service_fn(handler);
|
6068 6080 | /// let app = RestJson::builder(config)
|
6069 - | /// .malformed_accept_with_body_service(svc)
|
6081 + | /// .json_enums_service(svc)
|
6070 6082 | /// /* Set other handlers */
|
6071 6083 | /// .build()
|
6072 6084 | /// .unwrap();
|
6073 6085 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6074 6086 | /// ```
|
6075 6087 | ///
|
6076 - | pub fn malformed_accept_with_body_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6088 + | pub fn json_enums_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6077 6089 | where
|
6078 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedAcceptWithBody, ServiceExtractors>,
|
6090 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::JsonEnums, ServiceExtractors>,
|
6079 6091 |
|
6080 6092 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6081 6093 | RestJson<L>,
|
6082 - | crate::operation_shape::MalformedAcceptWithBody,
|
6083 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedAcceptWithBody, S>
|
6094 + | crate::operation_shape::JsonEnums,
|
6095 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::JsonEnums, S>
|
6084 6096 | >,
|
6085 6097 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6086 6098 | RestJson<L>,
|
6087 - | crate::operation_shape::MalformedAcceptWithBody,
|
6099 + | crate::operation_shape::JsonEnums,
|
6088 6100 | ModelPl::Output
|
6089 6101 | >,
|
6090 6102 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6091 6103 | RestJson<L>,
|
6092 - | crate::operation_shape::MalformedAcceptWithBody,
|
6104 + | crate::operation_shape::JsonEnums,
|
6093 6105 | <
|
6094 6106 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6095 6107 | as ::aws_smithy_http_server::plugin::Plugin<
|
6096 6108 | RestJson<L>,
|
6097 - | crate::operation_shape::MalformedAcceptWithBody,
|
6109 + | crate::operation_shape::JsonEnums,
|
6098 6110 | ModelPl::Output
|
6099 6111 | >
|
6100 6112 | >::Output
|
6101 6113 | >,
|
6102 6114 |
|
6103 6115 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6104 6116 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6105 6117 |
|
6106 6118 | {
|
6107 6119 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6108 6120 | use ::aws_smithy_http_server::plugin::Plugin;
|
6109 - | let svc = crate::operation_shape::MalformedAcceptWithBody::from_service(service);
|
6121 + | let svc = crate::operation_shape::JsonEnums::from_service(service);
|
6110 6122 | let svc = self.model_plugin.apply(svc);
|
6111 6123 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6112 6124 | .apply(svc);
|
6113 6125 | let svc = self.http_plugin.apply(svc);
|
6114 - | self.malformed_accept_with_body_custom(svc)
|
6126 + | self.json_enums_custom(svc)
|
6115 6127 | }
|
6116 6128 |
|
6117 - | /// Sets the [`MalformedAcceptWithBody`](crate::operation_shape::MalformedAcceptWithBody) to a custom [`Service`](tower::Service).
|
6129 + | /// Sets the [`JsonEnums`](crate::operation_shape::JsonEnums) to a custom [`Service`](tower::Service).
|
6118 6130 | /// not constrained by the Smithy contract.
|
6119 - | fn malformed_accept_with_body_custom<S>(mut self, svc: S) -> Self
|
6131 + | fn json_enums_custom<S>(mut self, svc: S) -> Self
|
6120 6132 | where
|
6121 6133 | S: ::tower::Service<
|
6122 6134 | ::http_1x::Request<Body>,
|
6123 6135 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
6124 6136 | Error = ::std::convert::Infallible,
|
6125 6137 | > + Clone
|
6126 6138 | + Send
|
6127 6139 | + 'static,
|
6128 6140 | S::Future: Send + 'static,
|
6129 6141 | {
|
6130 - | self.malformed_accept_with_body = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
6142 + | self.json_enums = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
6131 6143 | self
|
6132 6144 | }
|
6133 6145 |
|
6134 - | /// Sets the [`MalformedAcceptWithGenericString`](crate::operation_shape::MalformedAcceptWithGenericString) operation.
|
6146 + | /// Sets the [`JsonIntEnums`](crate::operation_shape::JsonIntEnums) operation.
|
6135 6147 | ///
|
6136 6148 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6137 6149 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6138 6150 | ///
|
6139 6151 | /// # Example
|
6140 6152 | ///
|
6141 6153 | /// ```no_run
|
6142 6154 | /// use rest_json::{RestJson, RestJsonConfig};
|
6143 6155 | ///
|
6144 6156 | /// use rest_json::{input, output, error};
|
6145 6157 | ///
|
6146 - | /// async fn handler(input: input::MalformedAcceptWithGenericStringInput) -> output::MalformedAcceptWithGenericStringOutput {
|
6158 + | /// async fn handler(input: input::JsonIntEnumsInput) -> Result<output::JsonIntEnumsOutput, error::JsonIntEnumsError> {
|
6147 6159 | /// todo!()
|
6148 6160 | /// }
|
6149 6161 | ///
|
6150 6162 | /// let config = RestJsonConfig::builder().build();
|
6151 6163 | /// let app = RestJson::builder(config)
|
6152 - | /// .malformed_accept_with_generic_string(handler)
|
6164 + | /// .json_int_enums(handler)
|
6153 6165 | /// /* Set other handlers */
|
6154 6166 | /// .build()
|
6155 6167 | /// .unwrap();
|
6156 6168 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6157 6169 | /// ```
|
6158 6170 | ///
|
6159 - | pub fn malformed_accept_with_generic_string<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6171 + | pub fn json_int_enums<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6160 6172 | where
|
6161 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedAcceptWithGenericString, HandlerExtractors>,
|
6173 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::JsonIntEnums, HandlerExtractors>,
|
6162 6174 |
|
6163 6175 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6164 6176 | RestJson<L>,
|
6165 - | crate::operation_shape::MalformedAcceptWithGenericString,
|
6166 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedAcceptWithGenericString, HandlerType>
|
6177 + | crate::operation_shape::JsonIntEnums,
|
6178 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::JsonIntEnums, HandlerType>
|
6167 6179 | >,
|
6168 6180 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6169 6181 | RestJson<L>,
|
6170 - | crate::operation_shape::MalformedAcceptWithGenericString,
|
6182 + | crate::operation_shape::JsonIntEnums,
|
6171 6183 | ModelPl::Output
|
6172 6184 | >,
|
6173 6185 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6174 6186 | RestJson<L>,
|
6175 - | crate::operation_shape::MalformedAcceptWithGenericString,
|
6187 + | crate::operation_shape::JsonIntEnums,
|
6176 6188 | <
|
6177 6189 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6178 6190 | as ::aws_smithy_http_server::plugin::Plugin<
|
6179 6191 | RestJson<L>,
|
6180 - | crate::operation_shape::MalformedAcceptWithGenericString,
|
6192 + | crate::operation_shape::JsonIntEnums,
|
6181 6193 | ModelPl::Output
|
6182 6194 | >
|
6183 6195 | >::Output
|
6184 6196 | >,
|
6185 6197 |
|
6186 6198 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6187 6199 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6188 6200 |
|
6189 6201 | {
|
6190 6202 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6191 6203 | use ::aws_smithy_http_server::plugin::Plugin;
|
6192 - | let svc = crate::operation_shape::MalformedAcceptWithGenericString::from_handler(handler);
|
6204 + | let svc = crate::operation_shape::JsonIntEnums::from_handler(handler);
|
6193 6205 | let svc = self.model_plugin.apply(svc);
|
6194 6206 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6195 6207 | .apply(svc);
|
6196 6208 | let svc = self.http_plugin.apply(svc);
|
6197 - | self.malformed_accept_with_generic_string_custom(svc)
|
6209 + | self.json_int_enums_custom(svc)
|
6198 6210 | }
|
6199 6211 |
|
6200 - | /// Sets the [`MalformedAcceptWithGenericString`](crate::operation_shape::MalformedAcceptWithGenericString) operation.
|
6212 + | /// Sets the [`JsonIntEnums`](crate::operation_shape::JsonIntEnums) operation.
|
6201 6213 | ///
|
6202 6214 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6203 6215 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6204 6216 | ///
|
6205 6217 | /// # Example
|
6206 6218 | ///
|
6207 6219 | /// ```no_run
|
6208 6220 | /// use rest_json::{RestJson, RestJsonConfig};
|
6209 6221 | ///
|
6210 6222 | /// use rest_json::{input, output, error};
|
6211 6223 | ///
|
6212 - | /// async fn handler(input: input::MalformedAcceptWithGenericStringInput) -> Result<output::MalformedAcceptWithGenericStringOutput, std::convert::Infallible> {
|
6224 + | /// async fn handler(input: input::JsonIntEnumsInput) -> Result<output::JsonIntEnumsOutput, error::JsonIntEnumsError> {
|
6213 6225 | /// todo!()
|
6214 6226 | /// }
|
6215 6227 | ///
|
6216 6228 | /// let config = RestJsonConfig::builder().build();
|
6217 6229 | /// let svc = ::tower::util::service_fn(handler);
|
6218 6230 | /// let app = RestJson::builder(config)
|
6219 - | /// .malformed_accept_with_generic_string_service(svc)
|
6231 + | /// .json_int_enums_service(svc)
|
6220 6232 | /// /* Set other handlers */
|
6221 6233 | /// .build()
|
6222 6234 | /// .unwrap();
|
6223 6235 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6224 6236 | /// ```
|
6225 6237 | ///
|
6226 - | pub fn malformed_accept_with_generic_string_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6238 + | pub fn json_int_enums_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6227 6239 | where
|
6228 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedAcceptWithGenericString, ServiceExtractors>,
|
6240 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::JsonIntEnums, ServiceExtractors>,
|
6229 6241 |
|
6230 6242 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6231 6243 | RestJson<L>,
|
6232 - | crate::operation_shape::MalformedAcceptWithGenericString,
|
6233 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedAcceptWithGenericString, S>
|
6244 + | crate::operation_shape::JsonIntEnums,
|
6245 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::JsonIntEnums, S>
|
6234 6246 | >,
|
6235 6247 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6236 6248 | RestJson<L>,
|
6237 - | crate::operation_shape::MalformedAcceptWithGenericString,
|
6249 + | crate::operation_shape::JsonIntEnums,
|
6238 6250 | ModelPl::Output
|
6239 6251 | >,
|
6240 6252 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6241 6253 | RestJson<L>,
|
6242 - | crate::operation_shape::MalformedAcceptWithGenericString,
|
6254 + | crate::operation_shape::JsonIntEnums,
|
6243 6255 | <
|
6244 6256 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6245 6257 | as ::aws_smithy_http_server::plugin::Plugin<
|
6246 6258 | RestJson<L>,
|
6247 - | crate::operation_shape::MalformedAcceptWithGenericString,
|
6259 + | crate::operation_shape::JsonIntEnums,
|
6248 6260 | ModelPl::Output
|
6249 6261 | >
|
6250 6262 | >::Output
|
6251 6263 | >,
|
6252 6264 |
|
6253 6265 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6254 6266 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6255 6267 |
|
6256 6268 | {
|
6257 6269 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6258 6270 | use ::aws_smithy_http_server::plugin::Plugin;
|
6259 - | let svc = crate::operation_shape::MalformedAcceptWithGenericString::from_service(service);
|
6271 + | let svc = crate::operation_shape::JsonIntEnums::from_service(service);
|
6260 6272 | let svc = self.model_plugin.apply(svc);
|
6261 6273 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6262 6274 | .apply(svc);
|
6263 6275 | let svc = self.http_plugin.apply(svc);
|
6264 - | self.malformed_accept_with_generic_string_custom(svc)
|
6276 + | self.json_int_enums_custom(svc)
|
6265 6277 | }
|
6266 6278 |
|
6267 - | /// Sets the [`MalformedAcceptWithGenericString`](crate::operation_shape::MalformedAcceptWithGenericString) to a custom [`Service`](tower::Service).
|
6279 + | /// Sets the [`JsonIntEnums`](crate::operation_shape::JsonIntEnums) to a custom [`Service`](tower::Service).
|
6268 6280 | /// not constrained by the Smithy contract.
|
6269 - | fn malformed_accept_with_generic_string_custom<S>(mut self, svc: S) -> Self
|
6281 + | fn json_int_enums_custom<S>(mut self, svc: S) -> Self
|
6270 6282 | where
|
6271 6283 | S: ::tower::Service<
|
6272 6284 | ::http_1x::Request<Body>,
|
6273 6285 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
6274 6286 | Error = ::std::convert::Infallible,
|
6275 6287 | > + Clone
|
6276 6288 | + Send
|
6277 6289 | + 'static,
|
6278 6290 | S::Future: Send + 'static,
|
6279 6291 | {
|
6280 - | self.malformed_accept_with_generic_string =
|
6281 - | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
6292 + | self.json_int_enums = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
6282 6293 | self
|
6283 6294 | }
|
6284 6295 |
|
6285 - | /// Sets the [`MalformedAcceptWithPayload`](crate::operation_shape::MalformedAcceptWithPayload) operation.
|
6296 + | /// Sets the [`JsonLists`](crate::operation_shape::JsonLists) operation.
|
6286 6297 | ///
|
6287 6298 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6288 6299 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6289 6300 | ///
|
6290 6301 | /// # Example
|
6291 6302 | ///
|
6292 6303 | /// ```no_run
|
6293 6304 | /// use rest_json::{RestJson, RestJsonConfig};
|
6294 6305 | ///
|
6295 6306 | /// use rest_json::{input, output, error};
|
6296 6307 | ///
|
6297 - | /// async fn handler(input: input::MalformedAcceptWithPayloadInput) -> output::MalformedAcceptWithPayloadOutput {
|
6308 + | /// async fn handler(input: input::JsonListsInput) -> Result<output::JsonListsOutput, error::JsonListsError> {
|
6298 6309 | /// todo!()
|
6299 6310 | /// }
|
6300 6311 | ///
|
6301 6312 | /// let config = RestJsonConfig::builder().build();
|
6302 6313 | /// let app = RestJson::builder(config)
|
6303 - | /// .malformed_accept_with_payload(handler)
|
6314 + | /// .json_lists(handler)
|
6304 6315 | /// /* Set other handlers */
|
6305 6316 | /// .build()
|
6306 6317 | /// .unwrap();
|
6307 6318 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6308 6319 | /// ```
|
6309 6320 | ///
|
6310 - | pub fn malformed_accept_with_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6321 + | pub fn json_lists<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6311 6322 | where
|
6312 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedAcceptWithPayload, HandlerExtractors>,
|
6323 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::JsonLists, HandlerExtractors>,
|
6313 6324 |
|
6314 6325 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6315 6326 | RestJson<L>,
|
6316 - | crate::operation_shape::MalformedAcceptWithPayload,
|
6317 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedAcceptWithPayload, HandlerType>
|
6327 + | crate::operation_shape::JsonLists,
|
6328 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::JsonLists, HandlerType>
|
6318 6329 | >,
|
6319 6330 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6320 6331 | RestJson<L>,
|
6321 - | crate::operation_shape::MalformedAcceptWithPayload,
|
6332 + | crate::operation_shape::JsonLists,
|
6322 6333 | ModelPl::Output
|
6323 6334 | >,
|
6324 6335 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6325 6336 | RestJson<L>,
|
6326 - | crate::operation_shape::MalformedAcceptWithPayload,
|
6337 + | crate::operation_shape::JsonLists,
|
6327 6338 | <
|
6328 6339 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6329 6340 | as ::aws_smithy_http_server::plugin::Plugin<
|
6330 6341 | RestJson<L>,
|
6331 - | crate::operation_shape::MalformedAcceptWithPayload,
|
6342 + | crate::operation_shape::JsonLists,
|
6332 6343 | ModelPl::Output
|
6333 6344 | >
|
6334 6345 | >::Output
|
6335 6346 | >,
|
6336 6347 |
|
6337 6348 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6338 6349 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6339 6350 |
|
6340 6351 | {
|
6341 6352 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6342 6353 | use ::aws_smithy_http_server::plugin::Plugin;
|
6343 - | let svc = crate::operation_shape::MalformedAcceptWithPayload::from_handler(handler);
|
6354 + | let svc = crate::operation_shape::JsonLists::from_handler(handler);
|
6344 6355 | let svc = self.model_plugin.apply(svc);
|
6345 6356 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6346 6357 | .apply(svc);
|
6347 6358 | let svc = self.http_plugin.apply(svc);
|
6348 - | self.malformed_accept_with_payload_custom(svc)
|
6359 + | self.json_lists_custom(svc)
|
6349 6360 | }
|
6350 6361 |
|
6351 - | /// Sets the [`MalformedAcceptWithPayload`](crate::operation_shape::MalformedAcceptWithPayload) operation.
|
6362 + | /// Sets the [`JsonLists`](crate::operation_shape::JsonLists) operation.
|
6352 6363 | ///
|
6353 6364 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6354 6365 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6355 6366 | ///
|
6356 6367 | /// # Example
|
6357 6368 | ///
|
6358 6369 | /// ```no_run
|
6359 6370 | /// use rest_json::{RestJson, RestJsonConfig};
|
6360 6371 | ///
|
6361 6372 | /// use rest_json::{input, output, error};
|
6362 6373 | ///
|
6363 - | /// async fn handler(input: input::MalformedAcceptWithPayloadInput) -> Result<output::MalformedAcceptWithPayloadOutput, std::convert::Infallible> {
|
6374 + | /// async fn handler(input: input::JsonListsInput) -> Result<output::JsonListsOutput, error::JsonListsError> {
|
6364 6375 | /// todo!()
|
6365 6376 | /// }
|
6366 6377 | ///
|
6367 6378 | /// let config = RestJsonConfig::builder().build();
|
6368 6379 | /// let svc = ::tower::util::service_fn(handler);
|
6369 6380 | /// let app = RestJson::builder(config)
|
6370 - | /// .malformed_accept_with_payload_service(svc)
|
6381 + | /// .json_lists_service(svc)
|
6371 6382 | /// /* Set other handlers */
|
6372 6383 | /// .build()
|
6373 6384 | /// .unwrap();
|
6374 6385 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6375 6386 | /// ```
|
6376 6387 | ///
|
6377 - | pub fn malformed_accept_with_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6388 + | pub fn json_lists_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6378 6389 | where
|
6379 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedAcceptWithPayload, ServiceExtractors>,
|
6390 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::JsonLists, ServiceExtractors>,
|
6380 6391 |
|
6381 6392 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6382 6393 | RestJson<L>,
|
6383 - | crate::operation_shape::MalformedAcceptWithPayload,
|
6384 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedAcceptWithPayload, S>
|
6394 + | crate::operation_shape::JsonLists,
|
6395 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::JsonLists, S>
|
6385 6396 | >,
|
6386 6397 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6387 6398 | RestJson<L>,
|
6388 - | crate::operation_shape::MalformedAcceptWithPayload,
|
6399 + | crate::operation_shape::JsonLists,
|
6389 6400 | ModelPl::Output
|
6390 6401 | >,
|
6391 6402 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6392 6403 | RestJson<L>,
|
6393 - | crate::operation_shape::MalformedAcceptWithPayload,
|
6404 + | crate::operation_shape::JsonLists,
|
6394 6405 | <
|
6395 6406 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6396 6407 | as ::aws_smithy_http_server::plugin::Plugin<
|
6397 6408 | RestJson<L>,
|
6398 - | crate::operation_shape::MalformedAcceptWithPayload,
|
6409 + | crate::operation_shape::JsonLists,
|
6399 6410 | ModelPl::Output
|
6400 6411 | >
|
6401 6412 | >::Output
|
6402 6413 | >,
|
6403 6414 |
|
6404 6415 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6405 6416 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6406 6417 |
|
6407 6418 | {
|
6408 6419 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6409 6420 | use ::aws_smithy_http_server::plugin::Plugin;
|
6410 - | let svc = crate::operation_shape::MalformedAcceptWithPayload::from_service(service);
|
6421 + | let svc = crate::operation_shape::JsonLists::from_service(service);
|
6411 6422 | let svc = self.model_plugin.apply(svc);
|
6412 6423 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6413 6424 | .apply(svc);
|
6414 6425 | let svc = self.http_plugin.apply(svc);
|
6415 - | self.malformed_accept_with_payload_custom(svc)
|
6426 + | self.json_lists_custom(svc)
|
6416 6427 | }
|
6417 6428 |
|
6418 - | /// Sets the [`MalformedAcceptWithPayload`](crate::operation_shape::MalformedAcceptWithPayload) to a custom [`Service`](tower::Service).
|
6429 + | /// Sets the [`JsonLists`](crate::operation_shape::JsonLists) to a custom [`Service`](tower::Service).
|
6419 6430 | /// not constrained by the Smithy contract.
|
6420 - | fn malformed_accept_with_payload_custom<S>(mut self, svc: S) -> Self
|
6431 + | fn json_lists_custom<S>(mut self, svc: S) -> Self
|
6421 6432 | where
|
6422 6433 | S: ::tower::Service<
|
6423 6434 | ::http_1x::Request<Body>,
|
6424 6435 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
6425 6436 | Error = ::std::convert::Infallible,
|
6426 6437 | > + Clone
|
6427 6438 | + Send
|
6428 6439 | + 'static,
|
6429 6440 | S::Future: Send + 'static,
|
6430 6441 | {
|
6431 - | self.malformed_accept_with_payload =
|
6432 - | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
6442 + | self.json_lists = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
6433 6443 | self
|
6434 6444 | }
|
6435 6445 |
|
6436 - | /// Sets the [`MalformedBlob`](crate::operation_shape::MalformedBlob) operation.
|
6446 + | /// Sets the [`JsonMaps`](crate::operation_shape::JsonMaps) operation.
|
6437 6447 | ///
|
6438 6448 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6439 6449 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6440 6450 | ///
|
6441 6451 | /// # Example
|
6442 6452 | ///
|
6443 6453 | /// ```no_run
|
6444 6454 | /// use rest_json::{RestJson, RestJsonConfig};
|
6445 6455 | ///
|
6446 6456 | /// use rest_json::{input, output, error};
|
6447 6457 | ///
|
6448 - | /// async fn handler(input: input::MalformedBlobInput) -> output::MalformedBlobOutput {
|
6458 + | /// async fn handler(input: input::JsonMapsInput) -> Result<output::JsonMapsOutput, error::JsonMapsError> {
|
6449 6459 | /// todo!()
|
6450 6460 | /// }
|
6451 6461 | ///
|
6452 6462 | /// let config = RestJsonConfig::builder().build();
|
6453 6463 | /// let app = RestJson::builder(config)
|
6454 - | /// .malformed_blob(handler)
|
6464 + | /// .json_maps(handler)
|
6455 6465 | /// /* Set other handlers */
|
6456 6466 | /// .build()
|
6457 6467 | /// .unwrap();
|
6458 6468 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6459 6469 | /// ```
|
6460 6470 | ///
|
6461 - | pub fn malformed_blob<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6471 + | pub fn json_maps<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6462 6472 | where
|
6463 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedBlob, HandlerExtractors>,
|
6473 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::JsonMaps, HandlerExtractors>,
|
6464 6474 |
|
6465 6475 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6466 6476 | RestJson<L>,
|
6467 - | crate::operation_shape::MalformedBlob,
|
6468 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedBlob, HandlerType>
|
6477 + | crate::operation_shape::JsonMaps,
|
6478 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::JsonMaps, HandlerType>
|
6469 6479 | >,
|
6470 6480 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6471 6481 | RestJson<L>,
|
6472 - | crate::operation_shape::MalformedBlob,
|
6482 + | crate::operation_shape::JsonMaps,
|
6473 6483 | ModelPl::Output
|
6474 6484 | >,
|
6475 6485 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6476 6486 | RestJson<L>,
|
6477 - | crate::operation_shape::MalformedBlob,
|
6487 + | crate::operation_shape::JsonMaps,
|
6478 6488 | <
|
6479 6489 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6480 6490 | as ::aws_smithy_http_server::plugin::Plugin<
|
6481 6491 | RestJson<L>,
|
6482 - | crate::operation_shape::MalformedBlob,
|
6492 + | crate::operation_shape::JsonMaps,
|
6483 6493 | ModelPl::Output
|
6484 6494 | >
|
6485 6495 | >::Output
|
6486 6496 | >,
|
6487 6497 |
|
6488 6498 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6489 6499 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6490 6500 |
|
6491 6501 | {
|
6492 6502 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6493 6503 | use ::aws_smithy_http_server::plugin::Plugin;
|
6494 - | let svc = crate::operation_shape::MalformedBlob::from_handler(handler);
|
6504 + | let svc = crate::operation_shape::JsonMaps::from_handler(handler);
|
6495 6505 | let svc = self.model_plugin.apply(svc);
|
6496 6506 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6497 6507 | .apply(svc);
|
6498 6508 | let svc = self.http_plugin.apply(svc);
|
6499 - | self.malformed_blob_custom(svc)
|
6509 + | self.json_maps_custom(svc)
|
6500 6510 | }
|
6501 6511 |
|
6502 - | /// Sets the [`MalformedBlob`](crate::operation_shape::MalformedBlob) operation.
|
6512 + | /// Sets the [`JsonMaps`](crate::operation_shape::JsonMaps) operation.
|
6503 6513 | ///
|
6504 6514 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6505 6515 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6506 6516 | ///
|
6507 6517 | /// # Example
|
6508 6518 | ///
|
6509 6519 | /// ```no_run
|
6510 6520 | /// use rest_json::{RestJson, RestJsonConfig};
|
6511 6521 | ///
|
6512 6522 | /// use rest_json::{input, output, error};
|
6513 6523 | ///
|
6514 - | /// async fn handler(input: input::MalformedBlobInput) -> Result<output::MalformedBlobOutput, std::convert::Infallible> {
|
6524 + | /// async fn handler(input: input::JsonMapsInput) -> Result<output::JsonMapsOutput, error::JsonMapsError> {
|
6515 6525 | /// todo!()
|
6516 6526 | /// }
|
6517 6527 | ///
|
6518 6528 | /// let config = RestJsonConfig::builder().build();
|
6519 6529 | /// let svc = ::tower::util::service_fn(handler);
|
6520 6530 | /// let app = RestJson::builder(config)
|
6521 - | /// .malformed_blob_service(svc)
|
6531 + | /// .json_maps_service(svc)
|
6522 6532 | /// /* Set other handlers */
|
6523 6533 | /// .build()
|
6524 6534 | /// .unwrap();
|
6525 6535 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6526 6536 | /// ```
|
6527 6537 | ///
|
6528 - | pub fn malformed_blob_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6538 + | pub fn json_maps_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6529 6539 | where
|
6530 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedBlob, ServiceExtractors>,
|
6540 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::JsonMaps, ServiceExtractors>,
|
6531 6541 |
|
6532 6542 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6533 6543 | RestJson<L>,
|
6534 - | crate::operation_shape::MalformedBlob,
|
6535 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedBlob, S>
|
6544 + | crate::operation_shape::JsonMaps,
|
6545 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::JsonMaps, S>
|
6536 6546 | >,
|
6537 6547 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6538 6548 | RestJson<L>,
|
6539 - | crate::operation_shape::MalformedBlob,
|
6549 + | crate::operation_shape::JsonMaps,
|
6540 6550 | ModelPl::Output
|
6541 6551 | >,
|
6542 6552 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6543 6553 | RestJson<L>,
|
6544 - | crate::operation_shape::MalformedBlob,
|
6554 + | crate::operation_shape::JsonMaps,
|
6545 6555 | <
|
6546 6556 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6547 6557 | as ::aws_smithy_http_server::plugin::Plugin<
|
6548 6558 | RestJson<L>,
|
6549 - | crate::operation_shape::MalformedBlob,
|
6559 + | crate::operation_shape::JsonMaps,
|
6550 6560 | ModelPl::Output
|
6551 6561 | >
|
6552 6562 | >::Output
|
6553 6563 | >,
|
6554 6564 |
|
6555 6565 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6556 6566 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6557 6567 |
|
6558 6568 | {
|
6559 6569 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6560 6570 | use ::aws_smithy_http_server::plugin::Plugin;
|
6561 - | let svc = crate::operation_shape::MalformedBlob::from_service(service);
|
6571 + | let svc = crate::operation_shape::JsonMaps::from_service(service);
|
6562 6572 | let svc = self.model_plugin.apply(svc);
|
6563 6573 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6564 6574 | .apply(svc);
|
6565 6575 | let svc = self.http_plugin.apply(svc);
|
6566 - | self.malformed_blob_custom(svc)
|
6576 + | self.json_maps_custom(svc)
|
6567 6577 | }
|
6568 6578 |
|
6569 - | /// Sets the [`MalformedBlob`](crate::operation_shape::MalformedBlob) to a custom [`Service`](tower::Service).
|
6579 + | /// Sets the [`JsonMaps`](crate::operation_shape::JsonMaps) to a custom [`Service`](tower::Service).
|
6570 6580 | /// not constrained by the Smithy contract.
|
6571 - | fn malformed_blob_custom<S>(mut self, svc: S) -> Self
|
6581 + | fn json_maps_custom<S>(mut self, svc: S) -> Self
|
6572 6582 | where
|
6573 6583 | S: ::tower::Service<
|
6574 6584 | ::http_1x::Request<Body>,
|
6575 6585 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
6576 6586 | Error = ::std::convert::Infallible,
|
6577 6587 | > + Clone
|
6578 6588 | + Send
|
6579 6589 | + 'static,
|
6580 6590 | S::Future: Send + 'static,
|
6581 6591 | {
|
6582 - | self.malformed_blob = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
6592 + | self.json_maps = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
6583 6593 | self
|
6584 6594 | }
|
6585 6595 |
|
6586 - | /// Sets the [`MalformedBoolean`](crate::operation_shape::MalformedBoolean) operation.
|
6596 + | /// Sets the [`JsonTimestamps`](crate::operation_shape::JsonTimestamps) operation.
|
6587 6597 | ///
|
6588 6598 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6589 6599 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6590 6600 | ///
|
6591 6601 | /// # Example
|
6592 6602 | ///
|
6593 6603 | /// ```no_run
|
6594 6604 | /// use rest_json::{RestJson, RestJsonConfig};
|
6595 6605 | ///
|
6596 6606 | /// use rest_json::{input, output, error};
|
6597 6607 | ///
|
6598 - | /// async fn handler(input: input::MalformedBooleanInput) -> Result<output::MalformedBooleanOutput, error::MalformedBooleanError> {
|
6608 + | /// async fn handler(input: input::JsonTimestampsInput) -> output::JsonTimestampsOutput {
|
6599 6609 | /// todo!()
|
6600 6610 | /// }
|
6601 6611 | ///
|
6602 6612 | /// let config = RestJsonConfig::builder().build();
|
6603 6613 | /// let app = RestJson::builder(config)
|
6604 - | /// .malformed_boolean(handler)
|
6614 + | /// .json_timestamps(handler)
|
6605 6615 | /// /* Set other handlers */
|
6606 6616 | /// .build()
|
6607 6617 | /// .unwrap();
|
6608 6618 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6609 6619 | /// ```
|
6610 6620 | ///
|
6611 - | pub fn malformed_boolean<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6621 + | pub fn json_timestamps<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6612 6622 | where
|
6613 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedBoolean, HandlerExtractors>,
|
6623 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::JsonTimestamps, HandlerExtractors>,
|
6614 6624 |
|
6615 6625 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6616 6626 | RestJson<L>,
|
6617 - | crate::operation_shape::MalformedBoolean,
|
6618 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedBoolean, HandlerType>
|
6627 + | crate::operation_shape::JsonTimestamps,
|
6628 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::JsonTimestamps, HandlerType>
|
6619 6629 | >,
|
6620 6630 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6621 6631 | RestJson<L>,
|
6622 - | crate::operation_shape::MalformedBoolean,
|
6632 + | crate::operation_shape::JsonTimestamps,
|
6623 6633 | ModelPl::Output
|
6624 6634 | >,
|
6625 6635 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6626 6636 | RestJson<L>,
|
6627 - | crate::operation_shape::MalformedBoolean,
|
6637 + | crate::operation_shape::JsonTimestamps,
|
6628 6638 | <
|
6629 6639 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6630 6640 | as ::aws_smithy_http_server::plugin::Plugin<
|
6631 6641 | RestJson<L>,
|
6632 - | crate::operation_shape::MalformedBoolean,
|
6642 + | crate::operation_shape::JsonTimestamps,
|
6633 6643 | ModelPl::Output
|
6634 6644 | >
|
6635 6645 | >::Output
|
6636 6646 | >,
|
6637 6647 |
|
6638 6648 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6639 6649 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6640 6650 |
|
6641 6651 | {
|
6642 6652 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6643 6653 | use ::aws_smithy_http_server::plugin::Plugin;
|
6644 - | let svc = crate::operation_shape::MalformedBoolean::from_handler(handler);
|
6654 + | let svc = crate::operation_shape::JsonTimestamps::from_handler(handler);
|
6645 6655 | let svc = self.model_plugin.apply(svc);
|
6646 6656 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6647 6657 | .apply(svc);
|
6648 6658 | let svc = self.http_plugin.apply(svc);
|
6649 - | self.malformed_boolean_custom(svc)
|
6659 + | self.json_timestamps_custom(svc)
|
6650 6660 | }
|
6651 6661 |
|
6652 - | /// Sets the [`MalformedBoolean`](crate::operation_shape::MalformedBoolean) operation.
|
6662 + | /// Sets the [`JsonTimestamps`](crate::operation_shape::JsonTimestamps) operation.
|
6653 6663 | ///
|
6654 6664 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6655 6665 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6656 6666 | ///
|
6657 6667 | /// # Example
|
6658 6668 | ///
|
6659 6669 | /// ```no_run
|
6660 6670 | /// use rest_json::{RestJson, RestJsonConfig};
|
6661 6671 | ///
|
6662 6672 | /// use rest_json::{input, output, error};
|
6663 6673 | ///
|
6664 - | /// async fn handler(input: input::MalformedBooleanInput) -> Result<output::MalformedBooleanOutput, error::MalformedBooleanError> {
|
6674 + | /// async fn handler(input: input::JsonTimestampsInput) -> Result<output::JsonTimestampsOutput, std::convert::Infallible> {
|
6665 6675 | /// todo!()
|
6666 6676 | /// }
|
6667 6677 | ///
|
6668 6678 | /// let config = RestJsonConfig::builder().build();
|
6669 6679 | /// let svc = ::tower::util::service_fn(handler);
|
6670 6680 | /// let app = RestJson::builder(config)
|
6671 - | /// .malformed_boolean_service(svc)
|
6681 + | /// .json_timestamps_service(svc)
|
6672 6682 | /// /* Set other handlers */
|
6673 6683 | /// .build()
|
6674 6684 | /// .unwrap();
|
6675 6685 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6676 6686 | /// ```
|
6677 6687 | ///
|
6678 - | pub fn malformed_boolean_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6688 + | pub fn json_timestamps_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6679 6689 | where
|
6680 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedBoolean, ServiceExtractors>,
|
6690 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::JsonTimestamps, ServiceExtractors>,
|
6681 6691 |
|
6682 6692 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6683 6693 | RestJson<L>,
|
6684 - | crate::operation_shape::MalformedBoolean,
|
6685 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedBoolean, S>
|
6694 + | crate::operation_shape::JsonTimestamps,
|
6695 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::JsonTimestamps, S>
|
6686 6696 | >,
|
6687 6697 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6688 6698 | RestJson<L>,
|
6689 - | crate::operation_shape::MalformedBoolean,
|
6699 + | crate::operation_shape::JsonTimestamps,
|
6690 6700 | ModelPl::Output
|
6691 6701 | >,
|
6692 6702 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6693 6703 | RestJson<L>,
|
6694 - | crate::operation_shape::MalformedBoolean,
|
6704 + | crate::operation_shape::JsonTimestamps,
|
6695 6705 | <
|
6696 6706 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6697 6707 | as ::aws_smithy_http_server::plugin::Plugin<
|
6698 6708 | RestJson<L>,
|
6699 - | crate::operation_shape::MalformedBoolean,
|
6709 + | crate::operation_shape::JsonTimestamps,
|
6710 + | ModelPl::Output
|
6711 + | >
|
6712 + | >::Output
|
6713 + | >,
|
6714 + |
|
6715 + | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6716 + | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6717 + |
|
6718 + | {
|
6719 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6720 + | use ::aws_smithy_http_server::plugin::Plugin;
|
6721 + | let svc = crate::operation_shape::JsonTimestamps::from_service(service);
|
6722 + | let svc = self.model_plugin.apply(svc);
|
6723 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6724 + | .apply(svc);
|
6725 + | let svc = self.http_plugin.apply(svc);
|
6726 + | self.json_timestamps_custom(svc)
|
6727 + | }
|
6728 + |
|
6729 + | /// Sets the [`JsonTimestamps`](crate::operation_shape::JsonTimestamps) to a custom [`Service`](tower::Service).
|
6730 + | /// not constrained by the Smithy contract.
|
6731 + | fn json_timestamps_custom<S>(mut self, svc: S) -> Self
|
6732 + | where
|
6733 + | S: ::tower::Service<
|
6734 + | ::http_1x::Request<Body>,
|
6735 + | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
6736 + | Error = ::std::convert::Infallible,
|
6737 + | > + Clone
|
6738 + | + Send
|
6739 + | + 'static,
|
6740 + | S::Future: Send + 'static,
|
6741 + | {
|
6742 + | self.json_timestamps = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
6743 + | self
|
6744 + | }
|
6745 + |
|
6746 + | /// Sets the [`JsonUnions`](crate::operation_shape::JsonUnions) operation.
|
6747 + | ///
|
6748 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6749 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6750 + | ///
|
6751 + | /// # Example
|
6752 + | ///
|
6753 + | /// ```no_run
|
6754 + | /// use rest_json::{RestJson, RestJsonConfig};
|
6755 + | ///
|
6756 + | /// use rest_json::{input, output, error};
|
6757 + | ///
|
6758 + | /// async fn handler(input: input::JsonUnionsInput) -> Result<output::JsonUnionsOutput, error::JsonUnionsError> {
|
6759 + | /// todo!()
|
6760 + | /// }
|
6761 + | ///
|
6762 + | /// let config = RestJsonConfig::builder().build();
|
6763 + | /// let app = RestJson::builder(config)
|
6764 + | /// .json_unions(handler)
|
6765 + | /// /* Set other handlers */
|
6766 + | /// .build()
|
6767 + | /// .unwrap();
|
6768 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6769 + | /// ```
|
6770 + | ///
|
6771 + | pub fn json_unions<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6772 + | where
|
6773 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::JsonUnions, HandlerExtractors>,
|
6774 + |
|
6775 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6776 + | RestJson<L>,
|
6777 + | crate::operation_shape::JsonUnions,
|
6778 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::JsonUnions, HandlerType>
|
6779 + | >,
|
6780 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6781 + | RestJson<L>,
|
6782 + | crate::operation_shape::JsonUnions,
|
6783 + | ModelPl::Output
|
6784 + | >,
|
6785 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6786 + | RestJson<L>,
|
6787 + | crate::operation_shape::JsonUnions,
|
6788 + | <
|
6789 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6790 + | as ::aws_smithy_http_server::plugin::Plugin<
|
6791 + | RestJson<L>,
|
6792 + | crate::operation_shape::JsonUnions,
|
6793 + | ModelPl::Output
|
6794 + | >
|
6795 + | >::Output
|
6796 + | >,
|
6797 + |
|
6798 + | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6799 + | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6800 + |
|
6801 + | {
|
6802 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6803 + | use ::aws_smithy_http_server::plugin::Plugin;
|
6804 + | let svc = crate::operation_shape::JsonUnions::from_handler(handler);
|
6805 + | let svc = self.model_plugin.apply(svc);
|
6806 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6807 + | .apply(svc);
|
6808 + | let svc = self.http_plugin.apply(svc);
|
6809 + | self.json_unions_custom(svc)
|
6810 + | }
|
6811 + |
|
6812 + | /// Sets the [`JsonUnions`](crate::operation_shape::JsonUnions) operation.
|
6813 + | ///
|
6814 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6815 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6816 + | ///
|
6817 + | /// # Example
|
6818 + | ///
|
6819 + | /// ```no_run
|
6820 + | /// use rest_json::{RestJson, RestJsonConfig};
|
6821 + | ///
|
6822 + | /// use rest_json::{input, output, error};
|
6823 + | ///
|
6824 + | /// async fn handler(input: input::JsonUnionsInput) -> Result<output::JsonUnionsOutput, error::JsonUnionsError> {
|
6825 + | /// todo!()
|
6826 + | /// }
|
6827 + | ///
|
6828 + | /// let config = RestJsonConfig::builder().build();
|
6829 + | /// let svc = ::tower::util::service_fn(handler);
|
6830 + | /// let app = RestJson::builder(config)
|
6831 + | /// .json_unions_service(svc)
|
6832 + | /// /* Set other handlers */
|
6833 + | /// .build()
|
6834 + | /// .unwrap();
|
6835 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6836 + | /// ```
|
6837 + | ///
|
6838 + | pub fn json_unions_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6839 + | where
|
6840 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::JsonUnions, ServiceExtractors>,
|
6841 + |
|
6842 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6843 + | RestJson<L>,
|
6844 + | crate::operation_shape::JsonUnions,
|
6845 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::JsonUnions, S>
|
6846 + | >,
|
6847 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6848 + | RestJson<L>,
|
6849 + | crate::operation_shape::JsonUnions,
|
6850 + | ModelPl::Output
|
6851 + | >,
|
6852 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6853 + | RestJson<L>,
|
6854 + | crate::operation_shape::JsonUnions,
|
6855 + | <
|
6856 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6857 + | as ::aws_smithy_http_server::plugin::Plugin<
|
6858 + | RestJson<L>,
|
6859 + | crate::operation_shape::JsonUnions,
|
6860 + | ModelPl::Output
|
6861 + | >
|
6862 + | >::Output
|
6863 + | >,
|
6864 + |
|
6865 + | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6866 + | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6867 + |
|
6868 + | {
|
6869 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6870 + | use ::aws_smithy_http_server::plugin::Plugin;
|
6871 + | let svc = crate::operation_shape::JsonUnions::from_service(service);
|
6872 + | let svc = self.model_plugin.apply(svc);
|
6873 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6874 + | .apply(svc);
|
6875 + | let svc = self.http_plugin.apply(svc);
|
6876 + | self.json_unions_custom(svc)
|
6877 + | }
|
6878 + |
|
6879 + | /// Sets the [`JsonUnions`](crate::operation_shape::JsonUnions) to a custom [`Service`](tower::Service).
|
6880 + | /// not constrained by the Smithy contract.
|
6881 + | fn json_unions_custom<S>(mut self, svc: S) -> Self
|
6882 + | where
|
6883 + | S: ::tower::Service<
|
6884 + | ::http_1x::Request<Body>,
|
6885 + | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
6886 + | Error = ::std::convert::Infallible,
|
6887 + | > + Clone
|
6888 + | + Send
|
6889 + | + 'static,
|
6890 + | S::Future: Send + 'static,
|
6891 + | {
|
6892 + | self.json_unions = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
6893 + | self
|
6894 + | }
|
6895 + |
|
6896 + | /// Sets the [`MalformedAcceptWithBody`](crate::operation_shape::MalformedAcceptWithBody) operation.
|
6897 + | ///
|
6898 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6899 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6900 + | ///
|
6901 + | /// # Example
|
6902 + | ///
|
6903 + | /// ```no_run
|
6904 + | /// use rest_json::{RestJson, RestJsonConfig};
|
6905 + | ///
|
6906 + | /// use rest_json::{input, output, error};
|
6907 + | ///
|
6908 + | /// async fn handler(input: input::MalformedAcceptWithBodyInput) -> output::MalformedAcceptWithBodyOutput {
|
6909 + | /// todo!()
|
6910 + | /// }
|
6911 + | ///
|
6912 + | /// let config = RestJsonConfig::builder().build();
|
6913 + | /// let app = RestJson::builder(config)
|
6914 + | /// .malformed_accept_with_body(handler)
|
6915 + | /// /* Set other handlers */
|
6916 + | /// .build()
|
6917 + | /// .unwrap();
|
6918 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6919 + | /// ```
|
6920 + | ///
|
6921 + | pub fn malformed_accept_with_body<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6922 + | where
|
6923 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedAcceptWithBody, HandlerExtractors>,
|
6924 + |
|
6925 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6926 + | RestJson<L>,
|
6927 + | crate::operation_shape::MalformedAcceptWithBody,
|
6928 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedAcceptWithBody, HandlerType>
|
6929 + | >,
|
6930 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6931 + | RestJson<L>,
|
6932 + | crate::operation_shape::MalformedAcceptWithBody,
|
6933 + | ModelPl::Output
|
6934 + | >,
|
6935 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6936 + | RestJson<L>,
|
6937 + | crate::operation_shape::MalformedAcceptWithBody,
|
6938 + | <
|
6939 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6940 + | as ::aws_smithy_http_server::plugin::Plugin<
|
6941 + | RestJson<L>,
|
6942 + | crate::operation_shape::MalformedAcceptWithBody,
|
6943 + | ModelPl::Output
|
6944 + | >
|
6945 + | >::Output
|
6946 + | >,
|
6947 + |
|
6948 + | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6949 + | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6950 + |
|
6951 + | {
|
6952 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6953 + | use ::aws_smithy_http_server::plugin::Plugin;
|
6954 + | let svc = crate::operation_shape::MalformedAcceptWithBody::from_handler(handler);
|
6955 + | let svc = self.model_plugin.apply(svc);
|
6956 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6957 + | .apply(svc);
|
6958 + | let svc = self.http_plugin.apply(svc);
|
6959 + | self.malformed_accept_with_body_custom(svc)
|
6960 + | }
|
6961 + |
|
6962 + | /// Sets the [`MalformedAcceptWithBody`](crate::operation_shape::MalformedAcceptWithBody) operation.
|
6963 + | ///
|
6964 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6965 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6966 + | ///
|
6967 + | /// # Example
|
6968 + | ///
|
6969 + | /// ```no_run
|
6970 + | /// use rest_json::{RestJson, RestJsonConfig};
|
6971 + | ///
|
6972 + | /// use rest_json::{input, output, error};
|
6973 + | ///
|
6974 + | /// async fn handler(input: input::MalformedAcceptWithBodyInput) -> Result<output::MalformedAcceptWithBodyOutput, std::convert::Infallible> {
|
6975 + | /// todo!()
|
6976 + | /// }
|
6977 + | ///
|
6978 + | /// let config = RestJsonConfig::builder().build();
|
6979 + | /// let svc = ::tower::util::service_fn(handler);
|
6980 + | /// let app = RestJson::builder(config)
|
6981 + | /// .malformed_accept_with_body_service(svc)
|
6982 + | /// /* Set other handlers */
|
6983 + | /// .build()
|
6984 + | /// .unwrap();
|
6985 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6986 + | /// ```
|
6987 + | ///
|
6988 + | pub fn malformed_accept_with_body_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6989 + | where
|
6990 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedAcceptWithBody, ServiceExtractors>,
|
6991 + |
|
6992 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6993 + | RestJson<L>,
|
6994 + | crate::operation_shape::MalformedAcceptWithBody,
|
6995 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedAcceptWithBody, S>
|
6996 + | >,
|
6997 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6998 + | RestJson<L>,
|
6999 + | crate::operation_shape::MalformedAcceptWithBody,
|
7000 + | ModelPl::Output
|
7001 + | >,
|
7002 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7003 + | RestJson<L>,
|
7004 + | crate::operation_shape::MalformedAcceptWithBody,
|
7005 + | <
|
7006 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7007 + | as ::aws_smithy_http_server::plugin::Plugin<
|
7008 + | RestJson<L>,
|
7009 + | crate::operation_shape::MalformedAcceptWithBody,
|
7010 + | ModelPl::Output
|
7011 + | >
|
7012 + | >::Output
|
7013 + | >,
|
7014 + |
|
7015 + | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7016 + | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7017 + |
|
7018 + | {
|
7019 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7020 + | use ::aws_smithy_http_server::plugin::Plugin;
|
7021 + | let svc = crate::operation_shape::MalformedAcceptWithBody::from_service(service);
|
7022 + | let svc = self.model_plugin.apply(svc);
|
7023 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7024 + | .apply(svc);
|
7025 + | let svc = self.http_plugin.apply(svc);
|
7026 + | self.malformed_accept_with_body_custom(svc)
|
7027 + | }
|
7028 + |
|
7029 + | /// Sets the [`MalformedAcceptWithBody`](crate::operation_shape::MalformedAcceptWithBody) to a custom [`Service`](tower::Service).
|
7030 + | /// not constrained by the Smithy contract.
|
7031 + | fn malformed_accept_with_body_custom<S>(mut self, svc: S) -> Self
|
7032 + | where
|
7033 + | S: ::tower::Service<
|
7034 + | ::http_1x::Request<Body>,
|
7035 + | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
7036 + | Error = ::std::convert::Infallible,
|
7037 + | > + Clone
|
7038 + | + Send
|
7039 + | + 'static,
|
7040 + | S::Future: Send + 'static,
|
7041 + | {
|
7042 + | self.malformed_accept_with_body = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
7043 + | self
|
7044 + | }
|
7045 + |
|
7046 + | /// Sets the [`MalformedAcceptWithGenericString`](crate::operation_shape::MalformedAcceptWithGenericString) operation.
|
7047 + | ///
|
7048 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7049 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7050 + | ///
|
7051 + | /// # Example
|
7052 + | ///
|
7053 + | /// ```no_run
|
7054 + | /// use rest_json::{RestJson, RestJsonConfig};
|
7055 + | ///
|
7056 + | /// use rest_json::{input, output, error};
|
7057 + | ///
|
7058 + | /// async fn handler(input: input::MalformedAcceptWithGenericStringInput) -> output::MalformedAcceptWithGenericStringOutput {
|
7059 + | /// todo!()
|
7060 + | /// }
|
7061 + | ///
|
7062 + | /// let config = RestJsonConfig::builder().build();
|
7063 + | /// let app = RestJson::builder(config)
|
7064 + | /// .malformed_accept_with_generic_string(handler)
|
7065 + | /// /* Set other handlers */
|
7066 + | /// .build()
|
7067 + | /// .unwrap();
|
7068 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7069 + | /// ```
|
7070 + | ///
|
7071 + | pub fn malformed_accept_with_generic_string<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7072 + | where
|
7073 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedAcceptWithGenericString, HandlerExtractors>,
|
7074 + |
|
7075 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7076 + | RestJson<L>,
|
7077 + | crate::operation_shape::MalformedAcceptWithGenericString,
|
7078 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedAcceptWithGenericString, HandlerType>
|
7079 + | >,
|
7080 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7081 + | RestJson<L>,
|
7082 + | crate::operation_shape::MalformedAcceptWithGenericString,
|
7083 + | ModelPl::Output
|
7084 + | >,
|
7085 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7086 + | RestJson<L>,
|
7087 + | crate::operation_shape::MalformedAcceptWithGenericString,
|
7088 + | <
|
7089 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7090 + | as ::aws_smithy_http_server::plugin::Plugin<
|
7091 + | RestJson<L>,
|
7092 + | crate::operation_shape::MalformedAcceptWithGenericString,
|
7093 + | ModelPl::Output
|
7094 + | >
|
7095 + | >::Output
|
7096 + | >,
|
7097 + |
|
7098 + | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7099 + | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7100 + |
|
7101 + | {
|
7102 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7103 + | use ::aws_smithy_http_server::plugin::Plugin;
|
7104 + | let svc = crate::operation_shape::MalformedAcceptWithGenericString::from_handler(handler);
|
7105 + | let svc = self.model_plugin.apply(svc);
|
7106 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7107 + | .apply(svc);
|
7108 + | let svc = self.http_plugin.apply(svc);
|
7109 + | self.malformed_accept_with_generic_string_custom(svc)
|
7110 + | }
|
7111 + |
|
7112 + | /// Sets the [`MalformedAcceptWithGenericString`](crate::operation_shape::MalformedAcceptWithGenericString) operation.
|
7113 + | ///
|
7114 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7115 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7116 + | ///
|
7117 + | /// # Example
|
7118 + | ///
|
7119 + | /// ```no_run
|
7120 + | /// use rest_json::{RestJson, RestJsonConfig};
|
7121 + | ///
|
7122 + | /// use rest_json::{input, output, error};
|
7123 + | ///
|
7124 + | /// async fn handler(input: input::MalformedAcceptWithGenericStringInput) -> Result<output::MalformedAcceptWithGenericStringOutput, std::convert::Infallible> {
|
7125 + | /// todo!()
|
7126 + | /// }
|
7127 + | ///
|
7128 + | /// let config = RestJsonConfig::builder().build();
|
7129 + | /// let svc = ::tower::util::service_fn(handler);
|
7130 + | /// let app = RestJson::builder(config)
|
7131 + | /// .malformed_accept_with_generic_string_service(svc)
|
7132 + | /// /* Set other handlers */
|
7133 + | /// .build()
|
7134 + | /// .unwrap();
|
7135 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7136 + | /// ```
|
7137 + | ///
|
7138 + | pub fn malformed_accept_with_generic_string_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7139 + | where
|
7140 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedAcceptWithGenericString, ServiceExtractors>,
|
7141 + |
|
7142 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7143 + | RestJson<L>,
|
7144 + | crate::operation_shape::MalformedAcceptWithGenericString,
|
7145 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedAcceptWithGenericString, S>
|
7146 + | >,
|
7147 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7148 + | RestJson<L>,
|
7149 + | crate::operation_shape::MalformedAcceptWithGenericString,
|
7150 + | ModelPl::Output
|
7151 + | >,
|
7152 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7153 + | RestJson<L>,
|
7154 + | crate::operation_shape::MalformedAcceptWithGenericString,
|
7155 + | <
|
7156 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7157 + | as ::aws_smithy_http_server::plugin::Plugin<
|
7158 + | RestJson<L>,
|
7159 + | crate::operation_shape::MalformedAcceptWithGenericString,
|
7160 + | ModelPl::Output
|
7161 + | >
|
7162 + | >::Output
|
7163 + | >,
|
7164 + |
|
7165 + | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7166 + | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7167 + |
|
7168 + | {
|
7169 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7170 + | use ::aws_smithy_http_server::plugin::Plugin;
|
7171 + | let svc = crate::operation_shape::MalformedAcceptWithGenericString::from_service(service);
|
7172 + | let svc = self.model_plugin.apply(svc);
|
7173 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7174 + | .apply(svc);
|
7175 + | let svc = self.http_plugin.apply(svc);
|
7176 + | self.malformed_accept_with_generic_string_custom(svc)
|
7177 + | }
|
7178 + |
|
7179 + | /// Sets the [`MalformedAcceptWithGenericString`](crate::operation_shape::MalformedAcceptWithGenericString) to a custom [`Service`](tower::Service).
|
7180 + | /// not constrained by the Smithy contract.
|
7181 + | fn malformed_accept_with_generic_string_custom<S>(mut self, svc: S) -> Self
|
7182 + | where
|
7183 + | S: ::tower::Service<
|
7184 + | ::http_1x::Request<Body>,
|
7185 + | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
7186 + | Error = ::std::convert::Infallible,
|
7187 + | > + Clone
|
7188 + | + Send
|
7189 + | + 'static,
|
7190 + | S::Future: Send + 'static,
|
7191 + | {
|
7192 + | self.malformed_accept_with_generic_string =
|
7193 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
7194 + | self
|
7195 + | }
|
7196 + |
|
7197 + | /// Sets the [`MalformedAcceptWithPayload`](crate::operation_shape::MalformedAcceptWithPayload) operation.
|
7198 + | ///
|
7199 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7200 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7201 + | ///
|
7202 + | /// # Example
|
7203 + | ///
|
7204 + | /// ```no_run
|
7205 + | /// use rest_json::{RestJson, RestJsonConfig};
|
7206 + | ///
|
7207 + | /// use rest_json::{input, output, error};
|
7208 + | ///
|
7209 + | /// async fn handler(input: input::MalformedAcceptWithPayloadInput) -> output::MalformedAcceptWithPayloadOutput {
|
7210 + | /// todo!()
|
7211 + | /// }
|
7212 + | ///
|
7213 + | /// let config = RestJsonConfig::builder().build();
|
7214 + | /// let app = RestJson::builder(config)
|
7215 + | /// .malformed_accept_with_payload(handler)
|
7216 + | /// /* Set other handlers */
|
7217 + | /// .build()
|
7218 + | /// .unwrap();
|
7219 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7220 + | /// ```
|
7221 + | ///
|
7222 + | pub fn malformed_accept_with_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7223 + | where
|
7224 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedAcceptWithPayload, HandlerExtractors>,
|
7225 + |
|
7226 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7227 + | RestJson<L>,
|
7228 + | crate::operation_shape::MalformedAcceptWithPayload,
|
7229 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedAcceptWithPayload, HandlerType>
|
7230 + | >,
|
7231 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7232 + | RestJson<L>,
|
7233 + | crate::operation_shape::MalformedAcceptWithPayload,
|
7234 + | ModelPl::Output
|
7235 + | >,
|
7236 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7237 + | RestJson<L>,
|
7238 + | crate::operation_shape::MalformedAcceptWithPayload,
|
7239 + | <
|
7240 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7241 + | as ::aws_smithy_http_server::plugin::Plugin<
|
7242 + | RestJson<L>,
|
7243 + | crate::operation_shape::MalformedAcceptWithPayload,
|
7244 + | ModelPl::Output
|
7245 + | >
|
7246 + | >::Output
|
7247 + | >,
|
7248 + |
|
7249 + | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7250 + | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7251 + |
|
7252 + | {
|
7253 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7254 + | use ::aws_smithy_http_server::plugin::Plugin;
|
7255 + | let svc = crate::operation_shape::MalformedAcceptWithPayload::from_handler(handler);
|
7256 + | let svc = self.model_plugin.apply(svc);
|
7257 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7258 + | .apply(svc);
|
7259 + | let svc = self.http_plugin.apply(svc);
|
7260 + | self.malformed_accept_with_payload_custom(svc)
|
7261 + | }
|
7262 + |
|
7263 + | /// Sets the [`MalformedAcceptWithPayload`](crate::operation_shape::MalformedAcceptWithPayload) operation.
|
7264 + | ///
|
7265 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7266 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7267 + | ///
|
7268 + | /// # Example
|
7269 + | ///
|
7270 + | /// ```no_run
|
7271 + | /// use rest_json::{RestJson, RestJsonConfig};
|
7272 + | ///
|
7273 + | /// use rest_json::{input, output, error};
|
7274 + | ///
|
7275 + | /// async fn handler(input: input::MalformedAcceptWithPayloadInput) -> Result<output::MalformedAcceptWithPayloadOutput, std::convert::Infallible> {
|
7276 + | /// todo!()
|
7277 + | /// }
|
7278 + | ///
|
7279 + | /// let config = RestJsonConfig::builder().build();
|
7280 + | /// let svc = ::tower::util::service_fn(handler);
|
7281 + | /// let app = RestJson::builder(config)
|
7282 + | /// .malformed_accept_with_payload_service(svc)
|
7283 + | /// /* Set other handlers */
|
7284 + | /// .build()
|
7285 + | /// .unwrap();
|
7286 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7287 + | /// ```
|
7288 + | ///
|
7289 + | pub fn malformed_accept_with_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7290 + | where
|
7291 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedAcceptWithPayload, ServiceExtractors>,
|
7292 + |
|
7293 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7294 + | RestJson<L>,
|
7295 + | crate::operation_shape::MalformedAcceptWithPayload,
|
7296 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedAcceptWithPayload, S>
|
7297 + | >,
|
7298 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7299 + | RestJson<L>,
|
7300 + | crate::operation_shape::MalformedAcceptWithPayload,
|
7301 + | ModelPl::Output
|
7302 + | >,
|
7303 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7304 + | RestJson<L>,
|
7305 + | crate::operation_shape::MalformedAcceptWithPayload,
|
7306 + | <
|
7307 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7308 + | as ::aws_smithy_http_server::plugin::Plugin<
|
7309 + | RestJson<L>,
|
7310 + | crate::operation_shape::MalformedAcceptWithPayload,
|
7311 + | ModelPl::Output
|
7312 + | >
|
7313 + | >::Output
|
7314 + | >,
|
7315 + |
|
7316 + | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7317 + | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7318 + |
|
7319 + | {
|
7320 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7321 + | use ::aws_smithy_http_server::plugin::Plugin;
|
7322 + | let svc = crate::operation_shape::MalformedAcceptWithPayload::from_service(service);
|
7323 + | let svc = self.model_plugin.apply(svc);
|
7324 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7325 + | .apply(svc);
|
7326 + | let svc = self.http_plugin.apply(svc);
|
7327 + | self.malformed_accept_with_payload_custom(svc)
|
7328 + | }
|
7329 + |
|
7330 + | /// Sets the [`MalformedAcceptWithPayload`](crate::operation_shape::MalformedAcceptWithPayload) to a custom [`Service`](tower::Service).
|
7331 + | /// not constrained by the Smithy contract.
|
7332 + | fn malformed_accept_with_payload_custom<S>(mut self, svc: S) -> Self
|
7333 + | where
|
7334 + | S: ::tower::Service<
|
7335 + | ::http_1x::Request<Body>,
|
7336 + | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
7337 + | Error = ::std::convert::Infallible,
|
7338 + | > + Clone
|
7339 + | + Send
|
7340 + | + 'static,
|
7341 + | S::Future: Send + 'static,
|
7342 + | {
|
7343 + | self.malformed_accept_with_payload =
|
7344 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
7345 + | self
|
7346 + | }
|
7347 + |
|
7348 + | /// Sets the [`MalformedBlob`](crate::operation_shape::MalformedBlob) operation.
|
7349 + | ///
|
7350 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7351 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7352 + | ///
|
7353 + | /// # Example
|
7354 + | ///
|
7355 + | /// ```no_run
|
7356 + | /// use rest_json::{RestJson, RestJsonConfig};
|
7357 + | ///
|
7358 + | /// use rest_json::{input, output, error};
|
7359 + | ///
|
7360 + | /// async fn handler(input: input::MalformedBlobInput) -> output::MalformedBlobOutput {
|
7361 + | /// todo!()
|
7362 + | /// }
|
7363 + | ///
|
7364 + | /// let config = RestJsonConfig::builder().build();
|
7365 + | /// let app = RestJson::builder(config)
|
7366 + | /// .malformed_blob(handler)
|
7367 + | /// /* Set other handlers */
|
7368 + | /// .build()
|
7369 + | /// .unwrap();
|
7370 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7371 + | /// ```
|
7372 + | ///
|
7373 + | pub fn malformed_blob<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7374 + | where
|
7375 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedBlob, HandlerExtractors>,
|
7376 + |
|
7377 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7378 + | RestJson<L>,
|
7379 + | crate::operation_shape::MalformedBlob,
|
7380 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedBlob, HandlerType>
|
7381 + | >,
|
7382 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7383 + | RestJson<L>,
|
7384 + | crate::operation_shape::MalformedBlob,
|
7385 + | ModelPl::Output
|
7386 + | >,
|
7387 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7388 + | RestJson<L>,
|
7389 + | crate::operation_shape::MalformedBlob,
|
7390 + | <
|
7391 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7392 + | as ::aws_smithy_http_server::plugin::Plugin<
|
7393 + | RestJson<L>,
|
7394 + | crate::operation_shape::MalformedBlob,
|
7395 + | ModelPl::Output
|
7396 + | >
|
7397 + | >::Output
|
7398 + | >,
|
7399 + |
|
7400 + | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7401 + | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7402 + |
|
7403 + | {
|
7404 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7405 + | use ::aws_smithy_http_server::plugin::Plugin;
|
7406 + | let svc = crate::operation_shape::MalformedBlob::from_handler(handler);
|
7407 + | let svc = self.model_plugin.apply(svc);
|
7408 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7409 + | .apply(svc);
|
7410 + | let svc = self.http_plugin.apply(svc);
|
7411 + | self.malformed_blob_custom(svc)
|
7412 + | }
|
7413 + |
|
7414 + | /// Sets the [`MalformedBlob`](crate::operation_shape::MalformedBlob) operation.
|
7415 + | ///
|
7416 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7417 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7418 + | ///
|
7419 + | /// # Example
|
7420 + | ///
|
7421 + | /// ```no_run
|
7422 + | /// use rest_json::{RestJson, RestJsonConfig};
|
7423 + | ///
|
7424 + | /// use rest_json::{input, output, error};
|
7425 + | ///
|
7426 + | /// async fn handler(input: input::MalformedBlobInput) -> Result<output::MalformedBlobOutput, std::convert::Infallible> {
|
7427 + | /// todo!()
|
7428 + | /// }
|
7429 + | ///
|
7430 + | /// let config = RestJsonConfig::builder().build();
|
7431 + | /// let svc = ::tower::util::service_fn(handler);
|
7432 + | /// let app = RestJson::builder(config)
|
7433 + | /// .malformed_blob_service(svc)
|
7434 + | /// /* Set other handlers */
|
7435 + | /// .build()
|
7436 + | /// .unwrap();
|
7437 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7438 + | /// ```
|
7439 + | ///
|
7440 + | pub fn malformed_blob_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7441 + | where
|
7442 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedBlob, ServiceExtractors>,
|
7443 + |
|
7444 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7445 + | RestJson<L>,
|
7446 + | crate::operation_shape::MalformedBlob,
|
7447 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedBlob, S>
|
7448 + | >,
|
7449 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7450 + | RestJson<L>,
|
7451 + | crate::operation_shape::MalformedBlob,
|
7452 + | ModelPl::Output
|
7453 + | >,
|
7454 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7455 + | RestJson<L>,
|
7456 + | crate::operation_shape::MalformedBlob,
|
7457 + | <
|
7458 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7459 + | as ::aws_smithy_http_server::plugin::Plugin<
|
7460 + | RestJson<L>,
|
7461 + | crate::operation_shape::MalformedBlob,
|
7462 + | ModelPl::Output
|
7463 + | >
|
7464 + | >::Output
|
7465 + | >,
|
7466 + |
|
7467 + | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7468 + | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7469 + |
|
7470 + | {
|
7471 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7472 + | use ::aws_smithy_http_server::plugin::Plugin;
|
7473 + | let svc = crate::operation_shape::MalformedBlob::from_service(service);
|
7474 + | let svc = self.model_plugin.apply(svc);
|
7475 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7476 + | .apply(svc);
|
7477 + | let svc = self.http_plugin.apply(svc);
|
7478 + | self.malformed_blob_custom(svc)
|
7479 + | }
|
7480 + |
|
7481 + | /// Sets the [`MalformedBlob`](crate::operation_shape::MalformedBlob) to a custom [`Service`](tower::Service).
|
7482 + | /// not constrained by the Smithy contract.
|
7483 + | fn malformed_blob_custom<S>(mut self, svc: S) -> Self
|
7484 + | where
|
7485 + | S: ::tower::Service<
|
7486 + | ::http_1x::Request<Body>,
|
7487 + | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
7488 + | Error = ::std::convert::Infallible,
|
7489 + | > + Clone
|
7490 + | + Send
|
7491 + | + 'static,
|
7492 + | S::Future: Send + 'static,
|
7493 + | {
|
7494 + | self.malformed_blob = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
7495 + | self
|
7496 + | }
|
7497 + |
|
7498 + | /// Sets the [`MalformedBoolean`](crate::operation_shape::MalformedBoolean) operation.
|
7499 + | ///
|
7500 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7501 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7502 + | ///
|
7503 + | /// # Example
|
7504 + | ///
|
7505 + | /// ```no_run
|
7506 + | /// use rest_json::{RestJson, RestJsonConfig};
|
7507 + | ///
|
7508 + | /// use rest_json::{input, output, error};
|
7509 + | ///
|
7510 + | /// async fn handler(input: input::MalformedBooleanInput) -> Result<output::MalformedBooleanOutput, error::MalformedBooleanError> {
|
7511 + | /// todo!()
|
7512 + | /// }
|
7513 + | ///
|
7514 + | /// let config = RestJsonConfig::builder().build();
|
7515 + | /// let app = RestJson::builder(config)
|
7516 + | /// .malformed_boolean(handler)
|
7517 + | /// /* Set other handlers */
|
7518 + | /// .build()
|
7519 + | /// .unwrap();
|
7520 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7521 + | /// ```
|
7522 + | ///
|
7523 + | pub fn malformed_boolean<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7524 + | where
|
7525 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedBoolean, HandlerExtractors>,
|
7526 + |
|
7527 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7528 + | RestJson<L>,
|
7529 + | crate::operation_shape::MalformedBoolean,
|
7530 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedBoolean, HandlerType>
|
7531 + | >,
|
7532 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7533 + | RestJson<L>,
|
7534 + | crate::operation_shape::MalformedBoolean,
|
7535 + | ModelPl::Output
|
7536 + | >,
|
7537 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7538 + | RestJson<L>,
|
7539 + | crate::operation_shape::MalformedBoolean,
|
7540 + | <
|
7541 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7542 + | as ::aws_smithy_http_server::plugin::Plugin<
|
7543 + | RestJson<L>,
|
7544 + | crate::operation_shape::MalformedBoolean,
|
7545 + | ModelPl::Output
|
7546 + | >
|
7547 + | >::Output
|
7548 + | >,
|
7549 + |
|
7550 + | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7551 + | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7552 + |
|
7553 + | {
|
7554 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7555 + | use ::aws_smithy_http_server::plugin::Plugin;
|
7556 + | let svc = crate::operation_shape::MalformedBoolean::from_handler(handler);
|
7557 + | let svc = self.model_plugin.apply(svc);
|
7558 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7559 + | .apply(svc);
|
7560 + | let svc = self.http_plugin.apply(svc);
|
7561 + | self.malformed_boolean_custom(svc)
|
7562 + | }
|
7563 + |
|
7564 + | /// Sets the [`MalformedBoolean`](crate::operation_shape::MalformedBoolean) operation.
|
7565 + | ///
|
7566 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7567 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7568 + | ///
|
7569 + | /// # Example
|
7570 + | ///
|
7571 + | /// ```no_run
|
7572 + | /// use rest_json::{RestJson, RestJsonConfig};
|
7573 + | ///
|
7574 + | /// use rest_json::{input, output, error};
|
7575 + | ///
|
7576 + | /// async fn handler(input: input::MalformedBooleanInput) -> Result<output::MalformedBooleanOutput, error::MalformedBooleanError> {
|
7577 + | /// todo!()
|
7578 + | /// }
|
7579 + | ///
|
7580 + | /// let config = RestJsonConfig::builder().build();
|
7581 + | /// let svc = ::tower::util::service_fn(handler);
|
7582 + | /// let app = RestJson::builder(config)
|
7583 + | /// .malformed_boolean_service(svc)
|
7584 + | /// /* Set other handlers */
|
7585 + | /// .build()
|
7586 + | /// .unwrap();
|
7587 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7588 + | /// ```
|
7589 + | ///
|
7590 + | pub fn malformed_boolean_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7591 + | where
|
7592 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedBoolean, ServiceExtractors>,
|
7593 + |
|
7594 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7595 + | RestJson<L>,
|
7596 + | crate::operation_shape::MalformedBoolean,
|
7597 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedBoolean, S>
|
7598 + | >,
|
7599 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7600 + | RestJson<L>,
|
7601 + | crate::operation_shape::MalformedBoolean,
|
7602 + | ModelPl::Output
|
7603 + | >,
|
7604 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7605 + | RestJson<L>,
|
7606 + | crate::operation_shape::MalformedBoolean,
|
7607 + | <
|
7608 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7609 + | as ::aws_smithy_http_server::plugin::Plugin<
|
7610 + | RestJson<L>,
|
7611 + | crate::operation_shape::MalformedBoolean,
|
6700 7612 | ModelPl::Output
|
6701 7613 | >
|
6702 7614 | >::Output
|
6703 7615 | >,
|
6704 7616 |
|
6705 7617 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6706 7618 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6707 7619 |
|
6708 7620 | {
|
6709 7621 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6710 7622 | use ::aws_smithy_http_server::plugin::Plugin;
|
6711 7623 | let svc = crate::operation_shape::MalformedBoolean::from_service(service);
|
6712 7624 | let svc = self.model_plugin.apply(svc);
|
6713 7625 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6714 7626 | .apply(svc);
|
6715 7627 | let svc = self.http_plugin.apply(svc);
|
6716 - | self.malformed_boolean_custom(svc)
|
7628 + | self.malformed_boolean_custom(svc)
|
7629 + | }
|
7630 + |
|
7631 + | /// Sets the [`MalformedBoolean`](crate::operation_shape::MalformedBoolean) to a custom [`Service`](tower::Service).
|
7632 + | /// not constrained by the Smithy contract.
|
7633 + | fn malformed_boolean_custom<S>(mut self, svc: S) -> Self
|
7634 + | where
|
7635 + | S: ::tower::Service<
|
7636 + | ::http_1x::Request<Body>,
|
7637 + | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
7638 + | Error = ::std::convert::Infallible,
|
7639 + | > + Clone
|
7640 + | + Send
|
7641 + | + 'static,
|
7642 + | S::Future: Send + 'static,
|
7643 + | {
|
7644 + | self.malformed_boolean = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
7645 + | self
|
7646 + | }
|
7647 + |
|
7648 + | /// Sets the [`MalformedByte`](crate::operation_shape::MalformedByte) operation.
|
7649 + | ///
|
7650 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7651 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7652 + | ///
|
7653 + | /// # Example
|
7654 + | ///
|
7655 + | /// ```no_run
|
7656 + | /// use rest_json::{RestJson, RestJsonConfig};
|
7657 + | ///
|
7658 + | /// use rest_json::{input, output, error};
|
7659 + | ///
|
7660 + | /// async fn handler(input: input::MalformedByteInput) -> Result<output::MalformedByteOutput, error::MalformedByteError> {
|
7661 + | /// todo!()
|
7662 + | /// }
|
7663 + | ///
|
7664 + | /// let config = RestJsonConfig::builder().build();
|
7665 + | /// let app = RestJson::builder(config)
|
7666 + | /// .malformed_byte(handler)
|
7667 + | /// /* Set other handlers */
|
7668 + | /// .build()
|
7669 + | /// .unwrap();
|
7670 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7671 + | /// ```
|
7672 + | ///
|
7673 + | pub fn malformed_byte<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7674 + | where
|
7675 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedByte, HandlerExtractors>,
|
7676 + |
|
7677 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7678 + | RestJson<L>,
|
7679 + | crate::operation_shape::MalformedByte,
|
7680 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedByte, HandlerType>
|
7681 + | >,
|
7682 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7683 + | RestJson<L>,
|
7684 + | crate::operation_shape::MalformedByte,
|
7685 + | ModelPl::Output
|
7686 + | >,
|
7687 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7688 + | RestJson<L>,
|
7689 + | crate::operation_shape::MalformedByte,
|
7690 + | <
|
7691 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7692 + | as ::aws_smithy_http_server::plugin::Plugin<
|
7693 + | RestJson<L>,
|
7694 + | crate::operation_shape::MalformedByte,
|
7695 + | ModelPl::Output
|
7696 + | >
|
7697 + | >::Output
|
7698 + | >,
|
7699 + |
|
7700 + | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7701 + | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7702 + |
|
7703 + | {
|
7704 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7705 + | use ::aws_smithy_http_server::plugin::Plugin;
|
7706 + | let svc = crate::operation_shape::MalformedByte::from_handler(handler);
|
7707 + | let svc = self.model_plugin.apply(svc);
|
7708 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7709 + | .apply(svc);
|
7710 + | let svc = self.http_plugin.apply(svc);
|
7711 + | self.malformed_byte_custom(svc)
|
7712 + | }
|
7713 + |
|
7714 + | /// Sets the [`MalformedByte`](crate::operation_shape::MalformedByte) operation.
|
7715 + | ///
|
7716 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7717 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7718 + | ///
|
7719 + | /// # Example
|
7720 + | ///
|
7721 + | /// ```no_run
|
7722 + | /// use rest_json::{RestJson, RestJsonConfig};
|
7723 + | ///
|
7724 + | /// use rest_json::{input, output, error};
|
7725 + | ///
|
7726 + | /// async fn handler(input: input::MalformedByteInput) -> Result<output::MalformedByteOutput, error::MalformedByteError> {
|
7727 + | /// todo!()
|
7728 + | /// }
|
7729 + | ///
|
7730 + | /// let config = RestJsonConfig::builder().build();
|
7731 + | /// let svc = ::tower::util::service_fn(handler);
|
7732 + | /// let app = RestJson::builder(config)
|
7733 + | /// .malformed_byte_service(svc)
|
7734 + | /// /* Set other handlers */
|
7735 + | /// .build()
|
7736 + | /// .unwrap();
|
7737 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7738 + | /// ```
|
7739 + | ///
|
7740 + | pub fn malformed_byte_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7741 + | where
|
7742 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedByte, ServiceExtractors>,
|
7743 + |
|
7744 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7745 + | RestJson<L>,
|
7746 + | crate::operation_shape::MalformedByte,
|
7747 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedByte, S>
|
7748 + | >,
|
7749 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7750 + | RestJson<L>,
|
7751 + | crate::operation_shape::MalformedByte,
|
7752 + | ModelPl::Output
|
7753 + | >,
|
7754 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7755 + | RestJson<L>,
|
7756 + | crate::operation_shape::MalformedByte,
|
7757 + | <
|
7758 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7759 + | as ::aws_smithy_http_server::plugin::Plugin<
|
7760 + | RestJson<L>,
|
7761 + | crate::operation_shape::MalformedByte,
|
7762 + | ModelPl::Output
|
7763 + | >
|
7764 + | >::Output
|
7765 + | >,
|
7766 + |
|
7767 + | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7768 + | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7769 + |
|
7770 + | {
|
7771 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7772 + | use ::aws_smithy_http_server::plugin::Plugin;
|
7773 + | let svc = crate::operation_shape::MalformedByte::from_service(service);
|
7774 + | let svc = self.model_plugin.apply(svc);
|
7775 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7776 + | .apply(svc);
|
7777 + | let svc = self.http_plugin.apply(svc);
|
7778 + | self.malformed_byte_custom(svc)
|
7779 + | }
|
7780 + |
|
7781 + | /// Sets the [`MalformedByte`](crate::operation_shape::MalformedByte) to a custom [`Service`](tower::Service).
|
7782 + | /// not constrained by the Smithy contract.
|
7783 + | fn malformed_byte_custom<S>(mut self, svc: S) -> Self
|
7784 + | where
|
7785 + | S: ::tower::Service<
|
7786 + | ::http_1x::Request<Body>,
|
7787 + | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
7788 + | Error = ::std::convert::Infallible,
|
7789 + | > + Clone
|
7790 + | + Send
|
7791 + | + 'static,
|
7792 + | S::Future: Send + 'static,
|
7793 + | {
|
7794 + | self.malformed_byte = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
7795 + | self
|
7796 + | }
|
7797 + |
|
7798 + | /// Sets the [`MalformedContentTypeWithBody`](crate::operation_shape::MalformedContentTypeWithBody) operation.
|
7799 + | ///
|
7800 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7801 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7802 + | ///
|
7803 + | /// # Example
|
7804 + | ///
|
7805 + | /// ```no_run
|
7806 + | /// use rest_json::{RestJson, RestJsonConfig};
|
7807 + | ///
|
7808 + | /// use rest_json::{input, output, error};
|
7809 + | ///
|
7810 + | /// async fn handler(input: input::MalformedContentTypeWithBodyInput) -> output::MalformedContentTypeWithBodyOutput {
|
7811 + | /// todo!()
|
7812 + | /// }
|
7813 + | ///
|
7814 + | /// let config = RestJsonConfig::builder().build();
|
7815 + | /// let app = RestJson::builder(config)
|
7816 + | /// .malformed_content_type_with_body(handler)
|
7817 + | /// /* Set other handlers */
|
7818 + | /// .build()
|
7819 + | /// .unwrap();
|
7820 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7821 + | /// ```
|
7822 + | ///
|
7823 + | pub fn malformed_content_type_with_body<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7824 + | where
|
7825 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithBody, HandlerExtractors>,
|
7826 + |
|
7827 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7828 + | RestJson<L>,
|
7829 + | crate::operation_shape::MalformedContentTypeWithBody,
|
7830 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithBody, HandlerType>
|
7831 + | >,
|
7832 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7833 + | RestJson<L>,
|
7834 + | crate::operation_shape::MalformedContentTypeWithBody,
|
7835 + | ModelPl::Output
|
7836 + | >,
|
7837 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7838 + | RestJson<L>,
|
7839 + | crate::operation_shape::MalformedContentTypeWithBody,
|
7840 + | <
|
7841 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7842 + | as ::aws_smithy_http_server::plugin::Plugin<
|
7843 + | RestJson<L>,
|
7844 + | crate::operation_shape::MalformedContentTypeWithBody,
|
7845 + | ModelPl::Output
|
7846 + | >
|
7847 + | >::Output
|
7848 + | >,
|
7849 + |
|
7850 + | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7851 + | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7852 + |
|
7853 + | {
|
7854 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7855 + | use ::aws_smithy_http_server::plugin::Plugin;
|
7856 + | let svc = crate::operation_shape::MalformedContentTypeWithBody::from_handler(handler);
|
7857 + | let svc = self.model_plugin.apply(svc);
|
7858 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7859 + | .apply(svc);
|
7860 + | let svc = self.http_plugin.apply(svc);
|
7861 + | self.malformed_content_type_with_body_custom(svc)
|
7862 + | }
|
7863 + |
|
7864 + | /// Sets the [`MalformedContentTypeWithBody`](crate::operation_shape::MalformedContentTypeWithBody) operation.
|
7865 + | ///
|
7866 + | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7867 + | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7868 + | ///
|
7869 + | /// # Example
|
7870 + | ///
|
7871 + | /// ```no_run
|
7872 + | /// use rest_json::{RestJson, RestJsonConfig};
|
7873 + | ///
|
7874 + | /// use rest_json::{input, output, error};
|
7875 + | ///
|
7876 + | /// async fn handler(input: input::MalformedContentTypeWithBodyInput) -> Result<output::MalformedContentTypeWithBodyOutput, std::convert::Infallible> {
|
7877 + | /// todo!()
|
7878 + | /// }
|
7879 + | ///
|
7880 + | /// let config = RestJsonConfig::builder().build();
|
7881 + | /// let svc = ::tower::util::service_fn(handler);
|
7882 + | /// let app = RestJson::builder(config)
|
7883 + | /// .malformed_content_type_with_body_service(svc)
|
7884 + | /// /* Set other handlers */
|
7885 + | /// .build()
|
7886 + | /// .unwrap();
|
7887 + | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7888 + | /// ```
|
7889 + | ///
|
7890 + | pub fn malformed_content_type_with_body_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7891 + | where
|
7892 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithBody, ServiceExtractors>,
|
7893 + |
|
7894 + | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7895 + | RestJson<L>,
|
7896 + | crate::operation_shape::MalformedContentTypeWithBody,
|
7897 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithBody, S>
|
7898 + | >,
|
7899 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7900 + | RestJson<L>,
|
7901 + | crate::operation_shape::MalformedContentTypeWithBody,
|
7902 + | ModelPl::Output
|
7903 + | >,
|
7904 + | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7905 + | RestJson<L>,
|
7906 + | crate::operation_shape::MalformedContentTypeWithBody,
|
7907 + | <
|
7908 + | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7909 + | as ::aws_smithy_http_server::plugin::Plugin<
|
7910 + | RestJson<L>,
|
7911 + | crate::operation_shape::MalformedContentTypeWithBody,
|
7912 + | ModelPl::Output
|
7913 + | >
|
7914 + | >::Output
|
7915 + | >,
|
7916 + |
|
7917 + | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7918 + | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7919 + |
|
7920 + | {
|
7921 + | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7922 + | use ::aws_smithy_http_server::plugin::Plugin;
|
7923 + | let svc = crate::operation_shape::MalformedContentTypeWithBody::from_service(service);
|
7924 + | let svc = self.model_plugin.apply(svc);
|
7925 + | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7926 + | .apply(svc);
|
7927 + | let svc = self.http_plugin.apply(svc);
|
7928 + | self.malformed_content_type_with_body_custom(svc)
|
6717 7929 | }
|
6718 7930 |
|
6719 - | /// Sets the [`MalformedBoolean`](crate::operation_shape::MalformedBoolean) to a custom [`Service`](tower::Service).
|
7931 + | /// Sets the [`MalformedContentTypeWithBody`](crate::operation_shape::MalformedContentTypeWithBody) to a custom [`Service`](tower::Service).
|
6720 7932 | /// not constrained by the Smithy contract.
|
6721 - | fn malformed_boolean_custom<S>(mut self, svc: S) -> Self
|
7933 + | fn malformed_content_type_with_body_custom<S>(mut self, svc: S) -> Self
|
6722 7934 | where
|
6723 7935 | S: ::tower::Service<
|
6724 7936 | ::http_1x::Request<Body>,
|
6725 7937 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
6726 7938 | Error = ::std::convert::Infallible,
|
6727 7939 | > + Clone
|
6728 7940 | + Send
|
6729 7941 | + 'static,
|
6730 7942 | S::Future: Send + 'static,
|
6731 7943 | {
|
6732 - | self.malformed_boolean = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
7944 + | self.malformed_content_type_with_body =
|
7945 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
6733 7946 | self
|
6734 7947 | }
|
6735 7948 |
|
6736 - | /// Sets the [`MalformedByte`](crate::operation_shape::MalformedByte) operation.
|
7949 + | /// Sets the [`MalformedContentTypeWithGenericString`](crate::operation_shape::MalformedContentTypeWithGenericString) operation.
|
6737 7950 | ///
|
6738 7951 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6739 7952 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6740 7953 | ///
|
6741 7954 | /// # Example
|
6742 7955 | ///
|
6743 7956 | /// ```no_run
|
6744 7957 | /// use rest_json::{RestJson, RestJsonConfig};
|
6745 7958 | ///
|
6746 7959 | /// use rest_json::{input, output, error};
|
6747 7960 | ///
|
6748 - | /// async fn handler(input: input::MalformedByteInput) -> Result<output::MalformedByteOutput, error::MalformedByteError> {
|
7961 + | /// async fn handler(input: input::MalformedContentTypeWithGenericStringInput) -> output::MalformedContentTypeWithGenericStringOutput {
|
6749 7962 | /// todo!()
|
6750 7963 | /// }
|
6751 7964 | ///
|
6752 7965 | /// let config = RestJsonConfig::builder().build();
|
6753 7966 | /// let app = RestJson::builder(config)
|
6754 - | /// .malformed_byte(handler)
|
7967 + | /// .malformed_content_type_with_generic_string(handler)
|
6755 7968 | /// /* Set other handlers */
|
6756 7969 | /// .build()
|
6757 7970 | /// .unwrap();
|
6758 7971 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6759 7972 | /// ```
|
6760 7973 | ///
|
6761 - | pub fn malformed_byte<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7974 + | pub fn malformed_content_type_with_generic_string<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6762 7975 | where
|
6763 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedByte, HandlerExtractors>,
|
7976 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithGenericString, HandlerExtractors>,
|
6764 7977 |
|
6765 7978 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6766 7979 | RestJson<L>,
|
6767 - | crate::operation_shape::MalformedByte,
|
6768 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedByte, HandlerType>
|
7980 + | crate::operation_shape::MalformedContentTypeWithGenericString,
|
7981 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithGenericString, HandlerType>
|
6769 7982 | >,
|
6770 7983 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6771 7984 | RestJson<L>,
|
6772 - | crate::operation_shape::MalformedByte,
|
7985 + | crate::operation_shape::MalformedContentTypeWithGenericString,
|
6773 7986 | ModelPl::Output
|
6774 7987 | >,
|
6775 7988 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6776 7989 | RestJson<L>,
|
6777 - | crate::operation_shape::MalformedByte,
|
7990 + | crate::operation_shape::MalformedContentTypeWithGenericString,
|
6778 7991 | <
|
6779 7992 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6780 7993 | as ::aws_smithy_http_server::plugin::Plugin<
|
6781 7994 | RestJson<L>,
|
6782 - | crate::operation_shape::MalformedByte,
|
7995 + | crate::operation_shape::MalformedContentTypeWithGenericString,
|
6783 7996 | ModelPl::Output
|
6784 7997 | >
|
6785 7998 | >::Output
|
6786 7999 | >,
|
6787 8000 |
|
6788 8001 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6789 8002 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6790 8003 |
|
6791 8004 | {
|
6792 8005 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6793 8006 | use ::aws_smithy_http_server::plugin::Plugin;
|
6794 - | let svc = crate::operation_shape::MalformedByte::from_handler(handler);
|
8007 + | let svc =
|
8008 + | crate::operation_shape::MalformedContentTypeWithGenericString::from_handler(handler);
|
6795 8009 | let svc = self.model_plugin.apply(svc);
|
6796 8010 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6797 8011 | .apply(svc);
|
6798 8012 | let svc = self.http_plugin.apply(svc);
|
6799 - | self.malformed_byte_custom(svc)
|
8013 + | self.malformed_content_type_with_generic_string_custom(svc)
|
6800 8014 | }
|
6801 8015 |
|
6802 - | /// Sets the [`MalformedByte`](crate::operation_shape::MalformedByte) operation.
|
8016 + | /// Sets the [`MalformedContentTypeWithGenericString`](crate::operation_shape::MalformedContentTypeWithGenericString) operation.
|
6803 8017 | ///
|
6804 8018 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6805 8019 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6806 8020 | ///
|
6807 8021 | /// # Example
|
6808 8022 | ///
|
6809 8023 | /// ```no_run
|
6810 8024 | /// use rest_json::{RestJson, RestJsonConfig};
|
6811 8025 | ///
|
6812 8026 | /// use rest_json::{input, output, error};
|
6813 8027 | ///
|
6814 - | /// async fn handler(input: input::MalformedByteInput) -> Result<output::MalformedByteOutput, error::MalformedByteError> {
|
8028 + | /// async fn handler(input: input::MalformedContentTypeWithGenericStringInput) -> Result<output::MalformedContentTypeWithGenericStringOutput, std::convert::Infallible> {
|
6815 8029 | /// todo!()
|
6816 8030 | /// }
|
6817 8031 | ///
|
6818 8032 | /// let config = RestJsonConfig::builder().build();
|
6819 8033 | /// let svc = ::tower::util::service_fn(handler);
|
6820 8034 | /// let app = RestJson::builder(config)
|
6821 - | /// .malformed_byte_service(svc)
|
8035 + | /// .malformed_content_type_with_generic_string_service(svc)
|
6822 8036 | /// /* Set other handlers */
|
6823 8037 | /// .build()
|
6824 8038 | /// .unwrap();
|
6825 8039 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6826 8040 | /// ```
|
6827 8041 | ///
|
6828 - | pub fn malformed_byte_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8042 + | pub fn malformed_content_type_with_generic_string_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6829 8043 | where
|
6830 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedByte, ServiceExtractors>,
|
8044 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithGenericString, ServiceExtractors>,
|
6831 8045 |
|
6832 8046 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6833 8047 | RestJson<L>,
|
6834 - | crate::operation_shape::MalformedByte,
|
6835 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedByte, S>
|
8048 + | crate::operation_shape::MalformedContentTypeWithGenericString,
|
8049 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithGenericString, S>
|
6836 8050 | >,
|
6837 8051 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6838 8052 | RestJson<L>,
|
6839 - | crate::operation_shape::MalformedByte,
|
8053 + | crate::operation_shape::MalformedContentTypeWithGenericString,
|
6840 8054 | ModelPl::Output
|
6841 8055 | >,
|
6842 8056 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6843 8057 | RestJson<L>,
|
6844 - | crate::operation_shape::MalformedByte,
|
8058 + | crate::operation_shape::MalformedContentTypeWithGenericString,
|
6845 8059 | <
|
6846 8060 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6847 8061 | as ::aws_smithy_http_server::plugin::Plugin<
|
6848 8062 | RestJson<L>,
|
6849 - | crate::operation_shape::MalformedByte,
|
8063 + | crate::operation_shape::MalformedContentTypeWithGenericString,
|
6850 8064 | ModelPl::Output
|
6851 8065 | >
|
6852 8066 | >::Output
|
6853 8067 | >,
|
6854 8068 |
|
6855 8069 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6856 8070 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6857 8071 |
|
6858 8072 | {
|
6859 8073 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6860 8074 | use ::aws_smithy_http_server::plugin::Plugin;
|
6861 - | let svc = crate::operation_shape::MalformedByte::from_service(service);
|
8075 + | let svc =
|
8076 + | crate::operation_shape::MalformedContentTypeWithGenericString::from_service(service);
|
6862 8077 | let svc = self.model_plugin.apply(svc);
|
6863 8078 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6864 8079 | .apply(svc);
|
6865 8080 | let svc = self.http_plugin.apply(svc);
|
6866 - | self.malformed_byte_custom(svc)
|
8081 + | self.malformed_content_type_with_generic_string_custom(svc)
|
6867 8082 | }
|
6868 8083 |
|
6869 - | /// Sets the [`MalformedByte`](crate::operation_shape::MalformedByte) to a custom [`Service`](tower::Service).
|
8084 + | /// Sets the [`MalformedContentTypeWithGenericString`](crate::operation_shape::MalformedContentTypeWithGenericString) to a custom [`Service`](tower::Service).
|
6870 8085 | /// not constrained by the Smithy contract.
|
6871 - | fn malformed_byte_custom<S>(mut self, svc: S) -> Self
|
8086 + | fn malformed_content_type_with_generic_string_custom<S>(mut self, svc: S) -> Self
|
6872 8087 | where
|
6873 8088 | S: ::tower::Service<
|
6874 8089 | ::http_1x::Request<Body>,
|
6875 8090 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
6876 8091 | Error = ::std::convert::Infallible,
|
6877 8092 | > + Clone
|
6878 8093 | + Send
|
6879 8094 | + 'static,
|
6880 8095 | S::Future: Send + 'static,
|
6881 8096 | {
|
6882 - | self.malformed_byte = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
8097 + | self.malformed_content_type_with_generic_string =
|
8098 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
6883 8099 | self
|
6884 8100 | }
|
6885 8101 |
|
6886 - | /// Sets the [`MalformedContentTypeWithBody`](crate::operation_shape::MalformedContentTypeWithBody) operation.
|
8102 + | /// Sets the [`MalformedContentTypeWithoutBody`](crate::operation_shape::MalformedContentTypeWithoutBody) operation.
|
6887 8103 | ///
|
6888 8104 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6889 8105 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6890 8106 | ///
|
6891 8107 | /// # Example
|
6892 8108 | ///
|
6893 8109 | /// ```no_run
|
6894 8110 | /// use rest_json::{RestJson, RestJsonConfig};
|
6895 8111 | ///
|
6896 8112 | /// use rest_json::{input, output, error};
|
6897 8113 | ///
|
6898 - | /// async fn handler(input: input::MalformedContentTypeWithBodyInput) -> output::MalformedContentTypeWithBodyOutput {
|
8114 + | /// async fn handler(input: input::MalformedContentTypeWithoutBodyInput) -> output::MalformedContentTypeWithoutBodyOutput {
|
6899 8115 | /// todo!()
|
6900 8116 | /// }
|
6901 8117 | ///
|
6902 8118 | /// let config = RestJsonConfig::builder().build();
|
6903 8119 | /// let app = RestJson::builder(config)
|
6904 - | /// .malformed_content_type_with_body(handler)
|
8120 + | /// .malformed_content_type_without_body(handler)
|
6905 8121 | /// /* Set other handlers */
|
6906 8122 | /// .build()
|
6907 8123 | /// .unwrap();
|
6908 8124 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6909 8125 | /// ```
|
6910 8126 | ///
|
6911 - | pub fn malformed_content_type_with_body<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8127 + | pub fn malformed_content_type_without_body<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
6912 8128 | where
|
6913 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithBody, HandlerExtractors>,
|
8129 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithoutBody, HandlerExtractors>,
|
6914 8130 |
|
6915 8131 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6916 8132 | RestJson<L>,
|
6917 - | crate::operation_shape::MalformedContentTypeWithBody,
|
6918 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithBody, HandlerType>
|
8133 + | crate::operation_shape::MalformedContentTypeWithoutBody,
|
8134 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithoutBody, HandlerType>
|
6919 8135 | >,
|
6920 8136 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6921 8137 | RestJson<L>,
|
6922 - | crate::operation_shape::MalformedContentTypeWithBody,
|
8138 + | crate::operation_shape::MalformedContentTypeWithoutBody,
|
6923 8139 | ModelPl::Output
|
6924 8140 | >,
|
6925 8141 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6926 8142 | RestJson<L>,
|
6927 - | crate::operation_shape::MalformedContentTypeWithBody,
|
8143 + | crate::operation_shape::MalformedContentTypeWithoutBody,
|
6928 8144 | <
|
6929 8145 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6930 8146 | as ::aws_smithy_http_server::plugin::Plugin<
|
6931 8147 | RestJson<L>,
|
6932 - | crate::operation_shape::MalformedContentTypeWithBody,
|
8148 + | crate::operation_shape::MalformedContentTypeWithoutBody,
|
6933 8149 | ModelPl::Output
|
6934 8150 | >
|
6935 8151 | >::Output
|
6936 8152 | >,
|
6937 8153 |
|
6938 8154 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
6939 8155 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
6940 8156 |
|
6941 8157 | {
|
6942 8158 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
6943 8159 | use ::aws_smithy_http_server::plugin::Plugin;
|
6944 - | let svc = crate::operation_shape::MalformedContentTypeWithBody::from_handler(handler);
|
8160 + | let svc = crate::operation_shape::MalformedContentTypeWithoutBody::from_handler(handler);
|
6945 8161 | let svc = self.model_plugin.apply(svc);
|
6946 8162 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
6947 8163 | .apply(svc);
|
6948 8164 | let svc = self.http_plugin.apply(svc);
|
6949 - | self.malformed_content_type_with_body_custom(svc)
|
8165 + | self.malformed_content_type_without_body_custom(svc)
|
6950 8166 | }
|
6951 8167 |
|
6952 - | /// Sets the [`MalformedContentTypeWithBody`](crate::operation_shape::MalformedContentTypeWithBody) operation.
|
8168 + | /// Sets the [`MalformedContentTypeWithoutBody`](crate::operation_shape::MalformedContentTypeWithoutBody) operation.
|
6953 8169 | ///
|
6954 8170 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
6955 8171 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
6956 8172 | ///
|
6957 8173 | /// # Example
|
6958 8174 | ///
|
6959 8175 | /// ```no_run
|
6960 8176 | /// use rest_json::{RestJson, RestJsonConfig};
|
6961 8177 | ///
|
6962 8178 | /// use rest_json::{input, output, error};
|
6963 8179 | ///
|
6964 - | /// async fn handler(input: input::MalformedContentTypeWithBodyInput) -> Result<output::MalformedContentTypeWithBodyOutput, std::convert::Infallible> {
|
8180 + | /// async fn handler(input: input::MalformedContentTypeWithoutBodyInput) -> Result<output::MalformedContentTypeWithoutBodyOutput, std::convert::Infallible> {
|
6965 8181 | /// todo!()
|
6966 8182 | /// }
|
6967 8183 | ///
|
6968 8184 | /// let config = RestJsonConfig::builder().build();
|
6969 8185 | /// let svc = ::tower::util::service_fn(handler);
|
6970 8186 | /// let app = RestJson::builder(config)
|
6971 - | /// .malformed_content_type_with_body_service(svc)
|
8187 + | /// .malformed_content_type_without_body_service(svc)
|
6972 8188 | /// /* Set other handlers */
|
6973 8189 | /// .build()
|
6974 8190 | /// .unwrap();
|
6975 8191 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
6976 8192 | /// ```
|
6977 8193 | ///
|
6978 - | pub fn malformed_content_type_with_body_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8194 + | pub fn malformed_content_type_without_body_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
6979 8195 | where
|
6980 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithBody, ServiceExtractors>,
|
8196 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithoutBody, ServiceExtractors>,
|
6981 8197 |
|
6982 8198 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
6983 8199 | RestJson<L>,
|
6984 - | crate::operation_shape::MalformedContentTypeWithBody,
|
6985 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithBody, S>
|
8200 + | crate::operation_shape::MalformedContentTypeWithoutBody,
|
8201 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithoutBody, S>
|
6986 8202 | >,
|
6987 8203 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
6988 8204 | RestJson<L>,
|
6989 - | crate::operation_shape::MalformedContentTypeWithBody,
|
8205 + | crate::operation_shape::MalformedContentTypeWithoutBody,
|
6990 8206 | ModelPl::Output
|
6991 8207 | >,
|
6992 8208 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
6993 8209 | RestJson<L>,
|
6994 - | crate::operation_shape::MalformedContentTypeWithBody,
|
8210 + | crate::operation_shape::MalformedContentTypeWithoutBody,
|
6995 8211 | <
|
6996 8212 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
6997 8213 | as ::aws_smithy_http_server::plugin::Plugin<
|
6998 8214 | RestJson<L>,
|
6999 - | crate::operation_shape::MalformedContentTypeWithBody,
|
8215 + | crate::operation_shape::MalformedContentTypeWithoutBody,
|
7000 8216 | ModelPl::Output
|
7001 8217 | >
|
7002 8218 | >::Output
|
7003 8219 | >,
|
7004 8220 |
|
7005 8221 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7006 8222 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7007 8223 |
|
7008 8224 | {
|
7009 8225 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7010 8226 | use ::aws_smithy_http_server::plugin::Plugin;
|
7011 - | let svc = crate::operation_shape::MalformedContentTypeWithBody::from_service(service);
|
8227 + | let svc = crate::operation_shape::MalformedContentTypeWithoutBody::from_service(service);
|
7012 8228 | let svc = self.model_plugin.apply(svc);
|
7013 8229 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7014 8230 | .apply(svc);
|
7015 8231 | let svc = self.http_plugin.apply(svc);
|
7016 - | self.malformed_content_type_with_body_custom(svc)
|
8232 + | self.malformed_content_type_without_body_custom(svc)
|
7017 8233 | }
|
7018 8234 |
|
7019 - | /// Sets the [`MalformedContentTypeWithBody`](crate::operation_shape::MalformedContentTypeWithBody) to a custom [`Service`](tower::Service).
|
8235 + | /// Sets the [`MalformedContentTypeWithoutBody`](crate::operation_shape::MalformedContentTypeWithoutBody) to a custom [`Service`](tower::Service).
|
7020 8236 | /// not constrained by the Smithy contract.
|
7021 - | fn malformed_content_type_with_body_custom<S>(mut self, svc: S) -> Self
|
8237 + | fn malformed_content_type_without_body_custom<S>(mut self, svc: S) -> Self
|
7022 8238 | where
|
7023 8239 | S: ::tower::Service<
|
7024 8240 | ::http_1x::Request<Body>,
|
7025 8241 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
7026 8242 | Error = ::std::convert::Infallible,
|
7027 8243 | > + Clone
|
7028 8244 | + Send
|
7029 8245 | + 'static,
|
7030 8246 | S::Future: Send + 'static,
|
7031 8247 | {
|
7032 - | self.malformed_content_type_with_body =
|
8248 + | self.malformed_content_type_without_body =
|
7033 8249 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
7034 8250 | self
|
7035 8251 | }
|
7036 8252 |
|
7037 - | /// Sets the [`MalformedContentTypeWithGenericString`](crate::operation_shape::MalformedContentTypeWithGenericString) operation.
|
8253 + | /// Sets the [`MalformedContentTypeWithoutBodyEmptyInput`](crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput) operation.
|
7038 8254 | ///
|
7039 8255 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7040 8256 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7041 8257 | ///
|
7042 8258 | /// # Example
|
7043 8259 | ///
|
7044 8260 | /// ```no_run
|
7045 8261 | /// use rest_json::{RestJson, RestJsonConfig};
|
7046 8262 | ///
|
7047 8263 | /// use rest_json::{input, output, error};
|
7048 8264 | ///
|
7049 - | /// async fn handler(input: input::MalformedContentTypeWithGenericStringInput) -> output::MalformedContentTypeWithGenericStringOutput {
|
8265 + | /// async fn handler(input: input::MalformedContentTypeWithoutBodyEmptyInputInput) -> output::MalformedContentTypeWithoutBodyEmptyInputOutput {
|
7050 8266 | /// todo!()
|
7051 8267 | /// }
|
7052 8268 | ///
|
7053 8269 | /// let config = RestJsonConfig::builder().build();
|
7054 8270 | /// let app = RestJson::builder(config)
|
7055 - | /// .malformed_content_type_with_generic_string(handler)
|
8271 + | /// .malformed_content_type_without_body_empty_input(handler)
|
7056 8272 | /// /* Set other handlers */
|
7057 8273 | /// .build()
|
7058 8274 | /// .unwrap();
|
7059 8275 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7060 8276 | /// ```
|
7061 8277 | ///
|
7062 - | pub fn malformed_content_type_with_generic_string<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8278 + | pub fn malformed_content_type_without_body_empty_input<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7063 8279 | where
|
7064 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithGenericString, HandlerExtractors>,
|
8280 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput, HandlerExtractors>,
|
7065 8281 |
|
7066 8282 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7067 8283 | RestJson<L>,
|
7068 - | crate::operation_shape::MalformedContentTypeWithGenericString,
|
7069 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithGenericString, HandlerType>
|
8284 + | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
8285 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput, HandlerType>
|
7070 8286 | >,
|
7071 8287 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7072 8288 | RestJson<L>,
|
7073 - | crate::operation_shape::MalformedContentTypeWithGenericString,
|
8289 + | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
7074 8290 | ModelPl::Output
|
7075 8291 | >,
|
7076 8292 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7077 8293 | RestJson<L>,
|
7078 - | crate::operation_shape::MalformedContentTypeWithGenericString,
|
8294 + | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
7079 8295 | <
|
7080 8296 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7081 8297 | as ::aws_smithy_http_server::plugin::Plugin<
|
7082 8298 | RestJson<L>,
|
7083 - | crate::operation_shape::MalformedContentTypeWithGenericString,
|
8299 + | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
7084 8300 | ModelPl::Output
|
7085 8301 | >
|
7086 8302 | >::Output
|
7087 8303 | >,
|
7088 8304 |
|
7089 8305 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7090 8306 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7091 8307 |
|
7092 8308 | {
|
7093 8309 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7094 8310 | use ::aws_smithy_http_server::plugin::Plugin;
|
7095 - | let svc =
|
7096 - | crate::operation_shape::MalformedContentTypeWithGenericString::from_handler(handler);
|
8311 + | let svc = crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput::from_handler(
|
8312 + | handler,
|
8313 + | );
|
7097 8314 | let svc = self.model_plugin.apply(svc);
|
7098 8315 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7099 8316 | .apply(svc);
|
7100 8317 | let svc = self.http_plugin.apply(svc);
|
7101 - | self.malformed_content_type_with_generic_string_custom(svc)
|
8318 + | self.malformed_content_type_without_body_empty_input_custom(svc)
|
7102 8319 | }
|
7103 8320 |
|
7104 - | /// Sets the [`MalformedContentTypeWithGenericString`](crate::operation_shape::MalformedContentTypeWithGenericString) operation.
|
8321 + | /// Sets the [`MalformedContentTypeWithoutBodyEmptyInput`](crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput) operation.
|
7105 8322 | ///
|
7106 8323 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7107 8324 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7108 8325 | ///
|
7109 8326 | /// # Example
|
7110 8327 | ///
|
7111 8328 | /// ```no_run
|
7112 8329 | /// use rest_json::{RestJson, RestJsonConfig};
|
7113 8330 | ///
|
7114 8331 | /// use rest_json::{input, output, error};
|
7115 8332 | ///
|
7116 - | /// async fn handler(input: input::MalformedContentTypeWithGenericStringInput) -> Result<output::MalformedContentTypeWithGenericStringOutput, std::convert::Infallible> {
|
8333 + | /// async fn handler(input: input::MalformedContentTypeWithoutBodyEmptyInputInput) -> Result<output::MalformedContentTypeWithoutBodyEmptyInputOutput, std::convert::Infallible> {
|
7117 8334 | /// todo!()
|
7118 8335 | /// }
|
7119 8336 | ///
|
7120 8337 | /// let config = RestJsonConfig::builder().build();
|
7121 8338 | /// let svc = ::tower::util::service_fn(handler);
|
7122 8339 | /// let app = RestJson::builder(config)
|
7123 - | /// .malformed_content_type_with_generic_string_service(svc)
|
8340 + | /// .malformed_content_type_without_body_empty_input_service(svc)
|
7124 8341 | /// /* Set other handlers */
|
7125 8342 | /// .build()
|
7126 8343 | /// .unwrap();
|
7127 8344 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7128 8345 | /// ```
|
7129 8346 | ///
|
7130 - | pub fn malformed_content_type_with_generic_string_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8347 + | pub fn malformed_content_type_without_body_empty_input_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7131 8348 | where
|
7132 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithGenericString, ServiceExtractors>,
|
8349 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput, ServiceExtractors>,
|
7133 8350 |
|
7134 8351 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7135 8352 | RestJson<L>,
|
7136 - | crate::operation_shape::MalformedContentTypeWithGenericString,
|
7137 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithGenericString, S>
|
8353 + | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
8354 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput, S>
|
7138 8355 | >,
|
7139 8356 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7140 8357 | RestJson<L>,
|
7141 - | crate::operation_shape::MalformedContentTypeWithGenericString,
|
8358 + | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
7142 8359 | ModelPl::Output
|
7143 8360 | >,
|
7144 8361 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7145 8362 | RestJson<L>,
|
7146 - | crate::operation_shape::MalformedContentTypeWithGenericString,
|
8363 + | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
7147 8364 | <
|
7148 8365 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7149 8366 | as ::aws_smithy_http_server::plugin::Plugin<
|
7150 8367 | RestJson<L>,
|
7151 - | crate::operation_shape::MalformedContentTypeWithGenericString,
|
8368 + | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
7152 8369 | ModelPl::Output
|
7153 8370 | >
|
7154 8371 | >::Output
|
7155 8372 | >,
|
7156 8373 |
|
7157 8374 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7158 8375 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7159 8376 |
|
7160 8377 | {
|
7161 8378 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7162 8379 | use ::aws_smithy_http_server::plugin::Plugin;
|
7163 - | let svc =
|
7164 - | crate::operation_shape::MalformedContentTypeWithGenericString::from_service(service);
|
8380 + | let svc = crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput::from_service(
|
8381 + | service,
|
8382 + | );
|
7165 8383 | let svc = self.model_plugin.apply(svc);
|
7166 8384 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7167 8385 | .apply(svc);
|
7168 8386 | let svc = self.http_plugin.apply(svc);
|
7169 - | self.malformed_content_type_with_generic_string_custom(svc)
|
8387 + | self.malformed_content_type_without_body_empty_input_custom(svc)
|
7170 8388 | }
|
7171 8389 |
|
7172 - | /// Sets the [`MalformedContentTypeWithGenericString`](crate::operation_shape::MalformedContentTypeWithGenericString) to a custom [`Service`](tower::Service).
|
8390 + | /// Sets the [`MalformedContentTypeWithoutBodyEmptyInput`](crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput) to a custom [`Service`](tower::Service).
|
7173 8391 | /// not constrained by the Smithy contract.
|
7174 - | fn malformed_content_type_with_generic_string_custom<S>(mut self, svc: S) -> Self
|
8392 + | fn malformed_content_type_without_body_empty_input_custom<S>(mut self, svc: S) -> Self
|
7175 8393 | where
|
7176 8394 | S: ::tower::Service<
|
7177 8395 | ::http_1x::Request<Body>,
|
7178 8396 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
7179 8397 | Error = ::std::convert::Infallible,
|
7180 8398 | > + Clone
|
7181 8399 | + Send
|
7182 8400 | + 'static,
|
7183 8401 | S::Future: Send + 'static,
|
7184 8402 | {
|
7185 - | self.malformed_content_type_with_generic_string =
|
8403 + | self.malformed_content_type_without_body_empty_input =
|
7186 8404 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
7187 8405 | self
|
7188 8406 | }
|
7189 8407 |
|
7190 - | /// Sets the [`MalformedContentTypeWithoutBody`](crate::operation_shape::MalformedContentTypeWithoutBody) operation.
|
8408 + | /// Sets the [`MalformedContentTypeWithPayload`](crate::operation_shape::MalformedContentTypeWithPayload) operation.
|
7191 8409 | ///
|
7192 8410 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7193 8411 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7194 8412 | ///
|
7195 8413 | /// # Example
|
7196 8414 | ///
|
7197 8415 | /// ```no_run
|
7198 8416 | /// use rest_json::{RestJson, RestJsonConfig};
|
7199 8417 | ///
|
7200 8418 | /// use rest_json::{input, output, error};
|
7201 8419 | ///
|
7202 - | /// async fn handler(input: input::MalformedContentTypeWithoutBodyInput) -> output::MalformedContentTypeWithoutBodyOutput {
|
8420 + | /// async fn handler(input: input::MalformedContentTypeWithPayloadInput) -> output::MalformedContentTypeWithPayloadOutput {
|
7203 8421 | /// todo!()
|
7204 8422 | /// }
|
7205 8423 | ///
|
7206 8424 | /// let config = RestJsonConfig::builder().build();
|
7207 8425 | /// let app = RestJson::builder(config)
|
7208 - | /// .malformed_content_type_without_body(handler)
|
8426 + | /// .malformed_content_type_with_payload(handler)
|
7209 8427 | /// /* Set other handlers */
|
7210 8428 | /// .build()
|
7211 8429 | /// .unwrap();
|
7212 8430 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7213 8431 | /// ```
|
7214 8432 | ///
|
7215 - | pub fn malformed_content_type_without_body<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8433 + | pub fn malformed_content_type_with_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7216 8434 | where
|
7217 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithoutBody, HandlerExtractors>,
|
8435 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithPayload, HandlerExtractors>,
|
7218 8436 |
|
7219 8437 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7220 8438 | RestJson<L>,
|
7221 - | crate::operation_shape::MalformedContentTypeWithoutBody,
|
7222 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithoutBody, HandlerType>
|
8439 + | crate::operation_shape::MalformedContentTypeWithPayload,
|
8440 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithPayload, HandlerType>
|
7223 8441 | >,
|
7224 8442 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7225 8443 | RestJson<L>,
|
7226 - | crate::operation_shape::MalformedContentTypeWithoutBody,
|
8444 + | crate::operation_shape::MalformedContentTypeWithPayload,
|
7227 8445 | ModelPl::Output
|
7228 8446 | >,
|
7229 8447 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7230 8448 | RestJson<L>,
|
7231 - | crate::operation_shape::MalformedContentTypeWithoutBody,
|
8449 + | crate::operation_shape::MalformedContentTypeWithPayload,
|
7232 8450 | <
|
7233 8451 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7234 8452 | as ::aws_smithy_http_server::plugin::Plugin<
|
7235 8453 | RestJson<L>,
|
7236 - | crate::operation_shape::MalformedContentTypeWithoutBody,
|
8454 + | crate::operation_shape::MalformedContentTypeWithPayload,
|
7237 8455 | ModelPl::Output
|
7238 8456 | >
|
7239 8457 | >::Output
|
7240 8458 | >,
|
7241 8459 |
|
7242 8460 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7243 8461 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7244 8462 |
|
7245 8463 | {
|
7246 8464 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7247 8465 | use ::aws_smithy_http_server::plugin::Plugin;
|
7248 - | let svc = crate::operation_shape::MalformedContentTypeWithoutBody::from_handler(handler);
|
8466 + | let svc = crate::operation_shape::MalformedContentTypeWithPayload::from_handler(handler);
|
7249 8467 | let svc = self.model_plugin.apply(svc);
|
7250 8468 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7251 8469 | .apply(svc);
|
7252 8470 | let svc = self.http_plugin.apply(svc);
|
7253 - | self.malformed_content_type_without_body_custom(svc)
|
8471 + | self.malformed_content_type_with_payload_custom(svc)
|
7254 8472 | }
|
7255 8473 |
|
7256 - | /// Sets the [`MalformedContentTypeWithoutBody`](crate::operation_shape::MalformedContentTypeWithoutBody) operation.
|
8474 + | /// Sets the [`MalformedContentTypeWithPayload`](crate::operation_shape::MalformedContentTypeWithPayload) operation.
|
7257 8475 | ///
|
7258 8476 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7259 8477 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7260 8478 | ///
|
7261 8479 | /// # Example
|
7262 8480 | ///
|
7263 8481 | /// ```no_run
|
7264 8482 | /// use rest_json::{RestJson, RestJsonConfig};
|
7265 8483 | ///
|
7266 8484 | /// use rest_json::{input, output, error};
|
7267 8485 | ///
|
7268 - | /// async fn handler(input: input::MalformedContentTypeWithoutBodyInput) -> Result<output::MalformedContentTypeWithoutBodyOutput, std::convert::Infallible> {
|
8486 + | /// async fn handler(input: input::MalformedContentTypeWithPayloadInput) -> Result<output::MalformedContentTypeWithPayloadOutput, std::convert::Infallible> {
|
7269 8487 | /// todo!()
|
7270 8488 | /// }
|
7271 8489 | ///
|
7272 8490 | /// let config = RestJsonConfig::builder().build();
|
7273 8491 | /// let svc = ::tower::util::service_fn(handler);
|
7274 8492 | /// let app = RestJson::builder(config)
|
7275 - | /// .malformed_content_type_without_body_service(svc)
|
8493 + | /// .malformed_content_type_with_payload_service(svc)
|
7276 8494 | /// /* Set other handlers */
|
7277 8495 | /// .build()
|
7278 8496 | /// .unwrap();
|
7279 8497 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7280 8498 | /// ```
|
7281 8499 | ///
|
7282 - | pub fn malformed_content_type_without_body_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8500 + | pub fn malformed_content_type_with_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7283 8501 | where
|
7284 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithoutBody, ServiceExtractors>,
|
8502 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithPayload, ServiceExtractors>,
|
7285 8503 |
|
7286 8504 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7287 8505 | RestJson<L>,
|
7288 - | crate::operation_shape::MalformedContentTypeWithoutBody,
|
7289 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithoutBody, S>
|
8506 + | crate::operation_shape::MalformedContentTypeWithPayload,
|
8507 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithPayload, S>
|
7290 8508 | >,
|
7291 8509 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7292 8510 | RestJson<L>,
|
7293 - | crate::operation_shape::MalformedContentTypeWithoutBody,
|
8511 + | crate::operation_shape::MalformedContentTypeWithPayload,
|
7294 8512 | ModelPl::Output
|
7295 8513 | >,
|
7296 8514 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7297 8515 | RestJson<L>,
|
7298 - | crate::operation_shape::MalformedContentTypeWithoutBody,
|
8516 + | crate::operation_shape::MalformedContentTypeWithPayload,
|
7299 8517 | <
|
7300 8518 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7301 8519 | as ::aws_smithy_http_server::plugin::Plugin<
|
7302 8520 | RestJson<L>,
|
7303 - | crate::operation_shape::MalformedContentTypeWithoutBody,
|
8521 + | crate::operation_shape::MalformedContentTypeWithPayload,
|
7304 8522 | ModelPl::Output
|
7305 8523 | >
|
7306 8524 | >::Output
|
7307 8525 | >,
|
7308 8526 |
|
7309 8527 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7310 8528 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7311 8529 |
|
7312 8530 | {
|
7313 8531 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7314 8532 | use ::aws_smithy_http_server::plugin::Plugin;
|
7315 - | let svc = crate::operation_shape::MalformedContentTypeWithoutBody::from_service(service);
|
8533 + | let svc = crate::operation_shape::MalformedContentTypeWithPayload::from_service(service);
|
7316 8534 | let svc = self.model_plugin.apply(svc);
|
7317 8535 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7318 8536 | .apply(svc);
|
7319 8537 | let svc = self.http_plugin.apply(svc);
|
7320 - | self.malformed_content_type_without_body_custom(svc)
|
8538 + | self.malformed_content_type_with_payload_custom(svc)
|
7321 8539 | }
|
7322 8540 |
|
7323 - | /// Sets the [`MalformedContentTypeWithoutBody`](crate::operation_shape::MalformedContentTypeWithoutBody) to a custom [`Service`](tower::Service).
|
8541 + | /// Sets the [`MalformedContentTypeWithPayload`](crate::operation_shape::MalformedContentTypeWithPayload) to a custom [`Service`](tower::Service).
|
7324 8542 | /// not constrained by the Smithy contract.
|
7325 - | fn malformed_content_type_without_body_custom<S>(mut self, svc: S) -> Self
|
8543 + | fn malformed_content_type_with_payload_custom<S>(mut self, svc: S) -> Self
|
7326 8544 | where
|
7327 8545 | S: ::tower::Service<
|
7328 8546 | ::http_1x::Request<Body>,
|
7329 8547 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
7330 8548 | Error = ::std::convert::Infallible,
|
7331 8549 | > + Clone
|
7332 8550 | + Send
|
7333 8551 | + 'static,
|
7334 8552 | S::Future: Send + 'static,
|
7335 8553 | {
|
7336 - | self.malformed_content_type_without_body =
|
8554 + | self.malformed_content_type_with_payload =
|
7337 8555 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
7338 8556 | self
|
7339 8557 | }
|
7340 8558 |
|
7341 - | /// Sets the [`MalformedContentTypeWithoutBodyEmptyInput`](crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput) operation.
|
8559 + | /// Sets the [`MalformedDouble`](crate::operation_shape::MalformedDouble) operation.
|
7342 8560 | ///
|
7343 8561 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7344 8562 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7345 8563 | ///
|
7346 8564 | /// # Example
|
7347 8565 | ///
|
7348 8566 | /// ```no_run
|
7349 8567 | /// use rest_json::{RestJson, RestJsonConfig};
|
7350 8568 | ///
|
7351 8569 | /// use rest_json::{input, output, error};
|
7352 8570 | ///
|
7353 - | /// async fn handler(input: input::MalformedContentTypeWithoutBodyEmptyInputInput) -> output::MalformedContentTypeWithoutBodyEmptyInputOutput {
|
8571 + | /// async fn handler(input: input::MalformedDoubleInput) -> Result<output::MalformedDoubleOutput, error::MalformedDoubleError> {
|
7354 8572 | /// todo!()
|
7355 8573 | /// }
|
7356 8574 | ///
|
7357 8575 | /// let config = RestJsonConfig::builder().build();
|
7358 8576 | /// let app = RestJson::builder(config)
|
7359 - | /// .malformed_content_type_without_body_empty_input(handler)
|
8577 + | /// .malformed_double(handler)
|
7360 8578 | /// /* Set other handlers */
|
7361 8579 | /// .build()
|
7362 8580 | /// .unwrap();
|
7363 8581 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7364 8582 | /// ```
|
7365 8583 | ///
|
7366 - | pub fn malformed_content_type_without_body_empty_input<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8584 + | pub fn malformed_double<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7367 8585 | where
|
7368 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput, HandlerExtractors>,
|
8586 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedDouble, HandlerExtractors>,
|
7369 8587 |
|
7370 8588 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7371 8589 | RestJson<L>,
|
7372 - | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
7373 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput, HandlerType>
|
8590 + | crate::operation_shape::MalformedDouble,
|
8591 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedDouble, HandlerType>
|
7374 8592 | >,
|
7375 8593 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7376 8594 | RestJson<L>,
|
7377 - | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
8595 + | crate::operation_shape::MalformedDouble,
|
7378 8596 | ModelPl::Output
|
7379 8597 | >,
|
7380 8598 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7381 8599 | RestJson<L>,
|
7382 - | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
8600 + | crate::operation_shape::MalformedDouble,
|
7383 8601 | <
|
7384 8602 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7385 8603 | as ::aws_smithy_http_server::plugin::Plugin<
|
7386 8604 | RestJson<L>,
|
7387 - | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
8605 + | crate::operation_shape::MalformedDouble,
|
7388 8606 | ModelPl::Output
|
7389 8607 | >
|
7390 8608 | >::Output
|
7391 8609 | >,
|
7392 8610 |
|
7393 8611 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7394 8612 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7395 8613 |
|
7396 8614 | {
|
7397 8615 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7398 8616 | use ::aws_smithy_http_server::plugin::Plugin;
|
7399 - | let svc = crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput::from_handler(
|
7400 - | handler,
|
7401 - | );
|
8617 + | let svc = crate::operation_shape::MalformedDouble::from_handler(handler);
|
7402 8618 | let svc = self.model_plugin.apply(svc);
|
7403 8619 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7404 8620 | .apply(svc);
|
7405 8621 | let svc = self.http_plugin.apply(svc);
|
7406 - | self.malformed_content_type_without_body_empty_input_custom(svc)
|
8622 + | self.malformed_double_custom(svc)
|
7407 8623 | }
|
7408 8624 |
|
7409 - | /// Sets the [`MalformedContentTypeWithoutBodyEmptyInput`](crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput) operation.
|
8625 + | /// Sets the [`MalformedDouble`](crate::operation_shape::MalformedDouble) operation.
|
7410 8626 | ///
|
7411 8627 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7412 8628 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7413 8629 | ///
|
7414 8630 | /// # Example
|
7415 8631 | ///
|
7416 8632 | /// ```no_run
|
7417 8633 | /// use rest_json::{RestJson, RestJsonConfig};
|
7418 8634 | ///
|
7419 8635 | /// use rest_json::{input, output, error};
|
7420 8636 | ///
|
7421 - | /// async fn handler(input: input::MalformedContentTypeWithoutBodyEmptyInputInput) -> Result<output::MalformedContentTypeWithoutBodyEmptyInputOutput, std::convert::Infallible> {
|
8637 + | /// async fn handler(input: input::MalformedDoubleInput) -> Result<output::MalformedDoubleOutput, error::MalformedDoubleError> {
|
7422 8638 | /// todo!()
|
7423 8639 | /// }
|
7424 8640 | ///
|
7425 8641 | /// let config = RestJsonConfig::builder().build();
|
7426 8642 | /// let svc = ::tower::util::service_fn(handler);
|
7427 8643 | /// let app = RestJson::builder(config)
|
7428 - | /// .malformed_content_type_without_body_empty_input_service(svc)
|
8644 + | /// .malformed_double_service(svc)
|
7429 8645 | /// /* Set other handlers */
|
7430 8646 | /// .build()
|
7431 8647 | /// .unwrap();
|
7432 8648 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7433 8649 | /// ```
|
7434 8650 | ///
|
7435 - | pub fn malformed_content_type_without_body_empty_input_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8651 + | pub fn malformed_double_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7436 8652 | where
|
7437 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput, ServiceExtractors>,
|
8653 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedDouble, ServiceExtractors>,
|
7438 8654 |
|
7439 8655 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7440 8656 | RestJson<L>,
|
7441 - | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
7442 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput, S>
|
8657 + | crate::operation_shape::MalformedDouble,
|
8658 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedDouble, S>
|
7443 8659 | >,
|
7444 8660 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7445 8661 | RestJson<L>,
|
7446 - | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
8662 + | crate::operation_shape::MalformedDouble,
|
7447 8663 | ModelPl::Output
|
7448 8664 | >,
|
7449 8665 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7450 8666 | RestJson<L>,
|
7451 - | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
8667 + | crate::operation_shape::MalformedDouble,
|
7452 8668 | <
|
7453 8669 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7454 8670 | as ::aws_smithy_http_server::plugin::Plugin<
|
7455 8671 | RestJson<L>,
|
7456 - | crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput,
|
8672 + | crate::operation_shape::MalformedDouble,
|
7457 8673 | ModelPl::Output
|
7458 8674 | >
|
7459 8675 | >::Output
|
7460 8676 | >,
|
7461 8677 |
|
7462 8678 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7463 8679 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7464 8680 |
|
7465 8681 | {
|
7466 8682 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7467 8683 | use ::aws_smithy_http_server::plugin::Plugin;
|
7468 - | let svc = crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput::from_service(
|
7469 - | service,
|
7470 - | );
|
8684 + | let svc = crate::operation_shape::MalformedDouble::from_service(service);
|
7471 8685 | let svc = self.model_plugin.apply(svc);
|
7472 8686 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7473 8687 | .apply(svc);
|
7474 8688 | let svc = self.http_plugin.apply(svc);
|
7475 - | self.malformed_content_type_without_body_empty_input_custom(svc)
|
8689 + | self.malformed_double_custom(svc)
|
7476 8690 | }
|
7477 8691 |
|
7478 - | /// Sets the [`MalformedContentTypeWithoutBodyEmptyInput`](crate::operation_shape::MalformedContentTypeWithoutBodyEmptyInput) to a custom [`Service`](tower::Service).
|
8692 + | /// Sets the [`MalformedDouble`](crate::operation_shape::MalformedDouble) to a custom [`Service`](tower::Service).
|
7479 8693 | /// not constrained by the Smithy contract.
|
7480 - | fn malformed_content_type_without_body_empty_input_custom<S>(mut self, svc: S) -> Self
|
8694 + | fn malformed_double_custom<S>(mut self, svc: S) -> Self
|
7481 8695 | where
|
7482 8696 | S: ::tower::Service<
|
7483 8697 | ::http_1x::Request<Body>,
|
7484 8698 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
7485 8699 | Error = ::std::convert::Infallible,
|
7486 8700 | > + Clone
|
7487 8701 | + Send
|
7488 8702 | + 'static,
|
7489 8703 | S::Future: Send + 'static,
|
7490 8704 | {
|
7491 - | self.malformed_content_type_without_body_empty_input =
|
7492 - | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
8705 + | self.malformed_double = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
7493 8706 | self
|
7494 8707 | }
|
7495 8708 |
|
7496 - | /// Sets the [`MalformedContentTypeWithPayload`](crate::operation_shape::MalformedContentTypeWithPayload) operation.
|
8709 + | /// Sets the [`MalformedFloat`](crate::operation_shape::MalformedFloat) operation.
|
7497 8710 | ///
|
7498 8711 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7499 8712 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7500 8713 | ///
|
7501 8714 | /// # Example
|
7502 8715 | ///
|
7503 8716 | /// ```no_run
|
7504 8717 | /// use rest_json::{RestJson, RestJsonConfig};
|
7505 8718 | ///
|
7506 8719 | /// use rest_json::{input, output, error};
|
7507 8720 | ///
|
7508 - | /// async fn handler(input: input::MalformedContentTypeWithPayloadInput) -> output::MalformedContentTypeWithPayloadOutput {
|
8721 + | /// async fn handler(input: input::MalformedFloatInput) -> Result<output::MalformedFloatOutput, error::MalformedFloatError> {
|
7509 8722 | /// todo!()
|
7510 8723 | /// }
|
7511 8724 | ///
|
7512 8725 | /// let config = RestJsonConfig::builder().build();
|
7513 8726 | /// let app = RestJson::builder(config)
|
7514 - | /// .malformed_content_type_with_payload(handler)
|
8727 + | /// .malformed_float(handler)
|
7515 8728 | /// /* Set other handlers */
|
7516 8729 | /// .build()
|
7517 8730 | /// .unwrap();
|
7518 8731 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7519 8732 | /// ```
|
7520 8733 | ///
|
7521 - | pub fn malformed_content_type_with_payload<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8734 + | pub fn malformed_float<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7522 8735 | where
|
7523 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedContentTypeWithPayload, HandlerExtractors>,
|
8736 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedFloat, HandlerExtractors>,
|
7524 8737 |
|
7525 8738 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7526 8739 | RestJson<L>,
|
7527 - | crate::operation_shape::MalformedContentTypeWithPayload,
|
7528 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedContentTypeWithPayload, HandlerType>
|
8740 + | crate::operation_shape::MalformedFloat,
|
8741 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedFloat, HandlerType>
|
7529 8742 | >,
|
7530 8743 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7531 8744 | RestJson<L>,
|
7532 - | crate::operation_shape::MalformedContentTypeWithPayload,
|
8745 + | crate::operation_shape::MalformedFloat,
|
7533 8746 | ModelPl::Output
|
7534 8747 | >,
|
7535 8748 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7536 8749 | RestJson<L>,
|
7537 - | crate::operation_shape::MalformedContentTypeWithPayload,
|
8750 + | crate::operation_shape::MalformedFloat,
|
7538 8751 | <
|
7539 8752 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7540 8753 | as ::aws_smithy_http_server::plugin::Plugin<
|
7541 8754 | RestJson<L>,
|
7542 - | crate::operation_shape::MalformedContentTypeWithPayload,
|
8755 + | crate::operation_shape::MalformedFloat,
|
7543 8756 | ModelPl::Output
|
7544 8757 | >
|
7545 8758 | >::Output
|
7546 8759 | >,
|
7547 8760 |
|
7548 8761 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7549 8762 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7550 8763 |
|
7551 8764 | {
|
7552 8765 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7553 8766 | use ::aws_smithy_http_server::plugin::Plugin;
|
7554 - | let svc = crate::operation_shape::MalformedContentTypeWithPayload::from_handler(handler);
|
8767 + | let svc = crate::operation_shape::MalformedFloat::from_handler(handler);
|
7555 8768 | let svc = self.model_plugin.apply(svc);
|
7556 8769 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7557 8770 | .apply(svc);
|
7558 8771 | let svc = self.http_plugin.apply(svc);
|
7559 - | self.malformed_content_type_with_payload_custom(svc)
|
8772 + | self.malformed_float_custom(svc)
|
7560 8773 | }
|
7561 8774 |
|
7562 - | /// Sets the [`MalformedContentTypeWithPayload`](crate::operation_shape::MalformedContentTypeWithPayload) operation.
|
8775 + | /// Sets the [`MalformedFloat`](crate::operation_shape::MalformedFloat) operation.
|
7563 8776 | ///
|
7564 8777 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7565 8778 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7566 8779 | ///
|
7567 8780 | /// # Example
|
7568 8781 | ///
|
7569 8782 | /// ```no_run
|
7570 8783 | /// use rest_json::{RestJson, RestJsonConfig};
|
7571 8784 | ///
|
7572 8785 | /// use rest_json::{input, output, error};
|
7573 8786 | ///
|
7574 - | /// async fn handler(input: input::MalformedContentTypeWithPayloadInput) -> Result<output::MalformedContentTypeWithPayloadOutput, std::convert::Infallible> {
|
8787 + | /// async fn handler(input: input::MalformedFloatInput) -> Result<output::MalformedFloatOutput, error::MalformedFloatError> {
|
7575 8788 | /// todo!()
|
7576 8789 | /// }
|
7577 8790 | ///
|
7578 8791 | /// let config = RestJsonConfig::builder().build();
|
7579 8792 | /// let svc = ::tower::util::service_fn(handler);
|
7580 8793 | /// let app = RestJson::builder(config)
|
7581 - | /// .malformed_content_type_with_payload_service(svc)
|
8794 + | /// .malformed_float_service(svc)
|
7582 8795 | /// /* Set other handlers */
|
7583 8796 | /// .build()
|
7584 8797 | /// .unwrap();
|
7585 8798 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7586 8799 | /// ```
|
7587 8800 | ///
|
7588 - | pub fn malformed_content_type_with_payload_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8801 + | pub fn malformed_float_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7589 8802 | where
|
7590 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedContentTypeWithPayload, ServiceExtractors>,
|
8803 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedFloat, ServiceExtractors>,
|
7591 8804 |
|
7592 8805 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7593 8806 | RestJson<L>,
|
7594 - | crate::operation_shape::MalformedContentTypeWithPayload,
|
7595 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedContentTypeWithPayload, S>
|
8807 + | crate::operation_shape::MalformedFloat,
|
8808 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedFloat, S>
|
7596 8809 | >,
|
7597 8810 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7598 8811 | RestJson<L>,
|
7599 - | crate::operation_shape::MalformedContentTypeWithPayload,
|
8812 + | crate::operation_shape::MalformedFloat,
|
7600 8813 | ModelPl::Output
|
7601 8814 | >,
|
7602 8815 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7603 8816 | RestJson<L>,
|
7604 - | crate::operation_shape::MalformedContentTypeWithPayload,
|
8817 + | crate::operation_shape::MalformedFloat,
|
7605 8818 | <
|
7606 8819 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7607 8820 | as ::aws_smithy_http_server::plugin::Plugin<
|
7608 8821 | RestJson<L>,
|
7609 - | crate::operation_shape::MalformedContentTypeWithPayload,
|
8822 + | crate::operation_shape::MalformedFloat,
|
7610 8823 | ModelPl::Output
|
7611 8824 | >
|
7612 8825 | >::Output
|
7613 8826 | >,
|
7614 8827 |
|
7615 8828 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7616 8829 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7617 8830 |
|
7618 8831 | {
|
7619 8832 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7620 8833 | use ::aws_smithy_http_server::plugin::Plugin;
|
7621 - | let svc = crate::operation_shape::MalformedContentTypeWithPayload::from_service(service);
|
8834 + | let svc = crate::operation_shape::MalformedFloat::from_service(service);
|
7622 8835 | let svc = self.model_plugin.apply(svc);
|
7623 8836 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7624 8837 | .apply(svc);
|
7625 8838 | let svc = self.http_plugin.apply(svc);
|
7626 - | self.malformed_content_type_with_payload_custom(svc)
|
8839 + | self.malformed_float_custom(svc)
|
7627 8840 | }
|
7628 8841 |
|
7629 - | /// Sets the [`MalformedContentTypeWithPayload`](crate::operation_shape::MalformedContentTypeWithPayload) to a custom [`Service`](tower::Service).
|
8842 + | /// Sets the [`MalformedFloat`](crate::operation_shape::MalformedFloat) to a custom [`Service`](tower::Service).
|
7630 8843 | /// not constrained by the Smithy contract.
|
7631 - | fn malformed_content_type_with_payload_custom<S>(mut self, svc: S) -> Self
|
8844 + | fn malformed_float_custom<S>(mut self, svc: S) -> Self
|
7632 8845 | where
|
7633 8846 | S: ::tower::Service<
|
7634 8847 | ::http_1x::Request<Body>,
|
7635 8848 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
7636 8849 | Error = ::std::convert::Infallible,
|
7637 8850 | > + Clone
|
7638 8851 | + Send
|
7639 8852 | + 'static,
|
7640 8853 | S::Future: Send + 'static,
|
7641 8854 | {
|
7642 - | self.malformed_content_type_with_payload =
|
7643 - | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
8855 + | self.malformed_float = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
7644 8856 | self
|
7645 8857 | }
|
7646 8858 |
|
7647 - | /// Sets the [`MalformedDouble`](crate::operation_shape::MalformedDouble) operation.
|
8859 + | /// Sets the [`MalformedInteger`](crate::operation_shape::MalformedInteger) operation.
|
7648 8860 | ///
|
7649 8861 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7650 8862 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7651 8863 | ///
|
7652 8864 | /// # Example
|
7653 8865 | ///
|
7654 8866 | /// ```no_run
|
7655 8867 | /// use rest_json::{RestJson, RestJsonConfig};
|
7656 8868 | ///
|
7657 8869 | /// use rest_json::{input, output, error};
|
7658 8870 | ///
|
7659 - | /// async fn handler(input: input::MalformedDoubleInput) -> Result<output::MalformedDoubleOutput, error::MalformedDoubleError> {
|
8871 + | /// async fn handler(input: input::MalformedIntegerInput) -> Result<output::MalformedIntegerOutput, error::MalformedIntegerError> {
|
7660 8872 | /// todo!()
|
7661 8873 | /// }
|
7662 8874 | ///
|
7663 8875 | /// let config = RestJsonConfig::builder().build();
|
7664 8876 | /// let app = RestJson::builder(config)
|
7665 - | /// .malformed_double(handler)
|
8877 + | /// .malformed_integer(handler)
|
7666 8878 | /// /* Set other handlers */
|
7667 8879 | /// .build()
|
7668 8880 | /// .unwrap();
|
7669 8881 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7670 8882 | /// ```
|
7671 8883 | ///
|
7672 - | pub fn malformed_double<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8884 + | pub fn malformed_integer<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7673 8885 | where
|
7674 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedDouble, HandlerExtractors>,
|
8886 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedInteger, HandlerExtractors>,
|
7675 8887 |
|
7676 8888 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7677 8889 | RestJson<L>,
|
7678 - | crate::operation_shape::MalformedDouble,
|
7679 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedDouble, HandlerType>
|
8890 + | crate::operation_shape::MalformedInteger,
|
8891 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedInteger, HandlerType>
|
7680 8892 | >,
|
7681 8893 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7682 8894 | RestJson<L>,
|
7683 - | crate::operation_shape::MalformedDouble,
|
8895 + | crate::operation_shape::MalformedInteger,
|
7684 8896 | ModelPl::Output
|
7685 8897 | >,
|
7686 8898 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7687 8899 | RestJson<L>,
|
7688 - | crate::operation_shape::MalformedDouble,
|
8900 + | crate::operation_shape::MalformedInteger,
|
7689 8901 | <
|
7690 8902 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7691 8903 | as ::aws_smithy_http_server::plugin::Plugin<
|
7692 8904 | RestJson<L>,
|
7693 - | crate::operation_shape::MalformedDouble,
|
8905 + | crate::operation_shape::MalformedInteger,
|
7694 8906 | ModelPl::Output
|
7695 8907 | >
|
7696 8908 | >::Output
|
7697 8909 | >,
|
7698 8910 |
|
7699 8911 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7700 8912 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7701 8913 |
|
7702 8914 | {
|
7703 8915 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7704 8916 | use ::aws_smithy_http_server::plugin::Plugin;
|
7705 - | let svc = crate::operation_shape::MalformedDouble::from_handler(handler);
|
8917 + | let svc = crate::operation_shape::MalformedInteger::from_handler(handler);
|
7706 8918 | let svc = self.model_plugin.apply(svc);
|
7707 8919 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7708 8920 | .apply(svc);
|
7709 8921 | let svc = self.http_plugin.apply(svc);
|
7710 - | self.malformed_double_custom(svc)
|
8922 + | self.malformed_integer_custom(svc)
|
7711 8923 | }
|
7712 8924 |
|
7713 - | /// Sets the [`MalformedDouble`](crate::operation_shape::MalformedDouble) operation.
|
8925 + | /// Sets the [`MalformedInteger`](crate::operation_shape::MalformedInteger) operation.
|
7714 8926 | ///
|
7715 8927 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7716 8928 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7717 8929 | ///
|
7718 8930 | /// # Example
|
7719 8931 | ///
|
7720 8932 | /// ```no_run
|
7721 8933 | /// use rest_json::{RestJson, RestJsonConfig};
|
7722 8934 | ///
|
7723 8935 | /// use rest_json::{input, output, error};
|
7724 8936 | ///
|
7725 - | /// async fn handler(input: input::MalformedDoubleInput) -> Result<output::MalformedDoubleOutput, error::MalformedDoubleError> {
|
8937 + | /// async fn handler(input: input::MalformedIntegerInput) -> Result<output::MalformedIntegerOutput, error::MalformedIntegerError> {
|
7726 8938 | /// todo!()
|
7727 8939 | /// }
|
7728 8940 | ///
|
7729 8941 | /// let config = RestJsonConfig::builder().build();
|
7730 8942 | /// let svc = ::tower::util::service_fn(handler);
|
7731 8943 | /// let app = RestJson::builder(config)
|
7732 - | /// .malformed_double_service(svc)
|
8944 + | /// .malformed_integer_service(svc)
|
7733 8945 | /// /* Set other handlers */
|
7734 8946 | /// .build()
|
7735 8947 | /// .unwrap();
|
7736 8948 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7737 8949 | /// ```
|
7738 8950 | ///
|
7739 - | pub fn malformed_double_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8951 + | pub fn malformed_integer_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7740 8952 | where
|
7741 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedDouble, ServiceExtractors>,
|
8953 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedInteger, ServiceExtractors>,
|
7742 8954 |
|
7743 8955 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7744 8956 | RestJson<L>,
|
7745 - | crate::operation_shape::MalformedDouble,
|
7746 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedDouble, S>
|
8957 + | crate::operation_shape::MalformedInteger,
|
8958 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedInteger, S>
|
7747 8959 | >,
|
7748 8960 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7749 8961 | RestJson<L>,
|
7750 - | crate::operation_shape::MalformedDouble,
|
8962 + | crate::operation_shape::MalformedInteger,
|
7751 8963 | ModelPl::Output
|
7752 8964 | >,
|
7753 8965 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7754 8966 | RestJson<L>,
|
7755 - | crate::operation_shape::MalformedDouble,
|
8967 + | crate::operation_shape::MalformedInteger,
|
7756 8968 | <
|
7757 8969 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7758 8970 | as ::aws_smithy_http_server::plugin::Plugin<
|
7759 8971 | RestJson<L>,
|
7760 - | crate::operation_shape::MalformedDouble,
|
8972 + | crate::operation_shape::MalformedInteger,
|
7761 8973 | ModelPl::Output
|
7762 8974 | >
|
7763 8975 | >::Output
|
7764 8976 | >,
|
7765 8977 |
|
7766 8978 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7767 8979 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7768 8980 |
|
7769 8981 | {
|
7770 8982 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7771 8983 | use ::aws_smithy_http_server::plugin::Plugin;
|
7772 - | let svc = crate::operation_shape::MalformedDouble::from_service(service);
|
8984 + | let svc = crate::operation_shape::MalformedInteger::from_service(service);
|
7773 8985 | let svc = self.model_plugin.apply(svc);
|
7774 8986 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7775 8987 | .apply(svc);
|
7776 8988 | let svc = self.http_plugin.apply(svc);
|
7777 - | self.malformed_double_custom(svc)
|
8989 + | self.malformed_integer_custom(svc)
|
7778 8990 | }
|
7779 8991 |
|
7780 - | /// Sets the [`MalformedDouble`](crate::operation_shape::MalformedDouble) to a custom [`Service`](tower::Service).
|
8992 + | /// Sets the [`MalformedInteger`](crate::operation_shape::MalformedInteger) to a custom [`Service`](tower::Service).
|
7781 8993 | /// not constrained by the Smithy contract.
|
7782 - | fn malformed_double_custom<S>(mut self, svc: S) -> Self
|
8994 + | fn malformed_integer_custom<S>(mut self, svc: S) -> Self
|
7783 8995 | where
|
7784 8996 | S: ::tower::Service<
|
7785 8997 | ::http_1x::Request<Body>,
|
7786 8998 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
7787 8999 | Error = ::std::convert::Infallible,
|
7788 9000 | > + Clone
|
7789 9001 | + Send
|
7790 9002 | + 'static,
|
7791 9003 | S::Future: Send + 'static,
|
7792 9004 | {
|
7793 - | self.malformed_double = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
9005 + | self.malformed_integer = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
7794 9006 | self
|
7795 9007 | }
|
7796 9008 |
|
7797 - | /// Sets the [`MalformedFloat`](crate::operation_shape::MalformedFloat) operation.
|
9009 + | /// Sets the [`MalformedList`](crate::operation_shape::MalformedList) operation.
|
7798 9010 | ///
|
7799 9011 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7800 9012 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7801 9013 | ///
|
7802 9014 | /// # Example
|
7803 9015 | ///
|
7804 9016 | /// ```no_run
|
7805 9017 | /// use rest_json::{RestJson, RestJsonConfig};
|
7806 9018 | ///
|
7807 9019 | /// use rest_json::{input, output, error};
|
7808 9020 | ///
|
7809 - | /// async fn handler(input: input::MalformedFloatInput) -> Result<output::MalformedFloatOutput, error::MalformedFloatError> {
|
9021 + | /// async fn handler(input: input::MalformedListInput) -> output::MalformedListOutput {
|
7810 9022 | /// todo!()
|
7811 9023 | /// }
|
7812 9024 | ///
|
7813 9025 | /// let config = RestJsonConfig::builder().build();
|
7814 9026 | /// let app = RestJson::builder(config)
|
7815 - | /// .malformed_float(handler)
|
9027 + | /// .malformed_list(handler)
|
7816 9028 | /// /* Set other handlers */
|
7817 9029 | /// .build()
|
7818 9030 | /// .unwrap();
|
7819 9031 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7820 9032 | /// ```
|
7821 9033 | ///
|
7822 - | pub fn malformed_float<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9034 + | pub fn malformed_list<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7823 9035 | where
|
7824 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedFloat, HandlerExtractors>,
|
9036 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedList, HandlerExtractors>,
|
7825 9037 |
|
7826 9038 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7827 9039 | RestJson<L>,
|
7828 - | crate::operation_shape::MalformedFloat,
|
7829 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedFloat, HandlerType>
|
9040 + | crate::operation_shape::MalformedList,
|
9041 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedList, HandlerType>
|
7830 9042 | >,
|
7831 9043 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7832 9044 | RestJson<L>,
|
7833 - | crate::operation_shape::MalformedFloat,
|
9045 + | crate::operation_shape::MalformedList,
|
7834 9046 | ModelPl::Output
|
7835 9047 | >,
|
7836 9048 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7837 9049 | RestJson<L>,
|
7838 - | crate::operation_shape::MalformedFloat,
|
9050 + | crate::operation_shape::MalformedList,
|
7839 9051 | <
|
7840 9052 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7841 9053 | as ::aws_smithy_http_server::plugin::Plugin<
|
7842 9054 | RestJson<L>,
|
7843 - | crate::operation_shape::MalformedFloat,
|
9055 + | crate::operation_shape::MalformedList,
|
7844 9056 | ModelPl::Output
|
7845 9057 | >
|
7846 9058 | >::Output
|
7847 9059 | >,
|
7848 9060 |
|
7849 9061 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7850 9062 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7851 9063 |
|
7852 9064 | {
|
7853 9065 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7854 9066 | use ::aws_smithy_http_server::plugin::Plugin;
|
7855 - | let svc = crate::operation_shape::MalformedFloat::from_handler(handler);
|
9067 + | let svc = crate::operation_shape::MalformedList::from_handler(handler);
|
7856 9068 | let svc = self.model_plugin.apply(svc);
|
7857 9069 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7858 9070 | .apply(svc);
|
7859 9071 | let svc = self.http_plugin.apply(svc);
|
7860 - | self.malformed_float_custom(svc)
|
9072 + | self.malformed_list_custom(svc)
|
7861 9073 | }
|
7862 9074 |
|
7863 - | /// Sets the [`MalformedFloat`](crate::operation_shape::MalformedFloat) operation.
|
9075 + | /// Sets the [`MalformedList`](crate::operation_shape::MalformedList) operation.
|
7864 9076 | ///
|
7865 9077 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7866 9078 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7867 9079 | ///
|
7868 9080 | /// # Example
|
7869 9081 | ///
|
7870 9082 | /// ```no_run
|
7871 9083 | /// use rest_json::{RestJson, RestJsonConfig};
|
7872 9084 | ///
|
7873 9085 | /// use rest_json::{input, output, error};
|
7874 9086 | ///
|
7875 - | /// async fn handler(input: input::MalformedFloatInput) -> Result<output::MalformedFloatOutput, error::MalformedFloatError> {
|
9087 + | /// async fn handler(input: input::MalformedListInput) -> Result<output::MalformedListOutput, std::convert::Infallible> {
|
7876 9088 | /// todo!()
|
7877 9089 | /// }
|
7878 9090 | ///
|
7879 9091 | /// let config = RestJsonConfig::builder().build();
|
7880 9092 | /// let svc = ::tower::util::service_fn(handler);
|
7881 9093 | /// let app = RestJson::builder(config)
|
7882 - | /// .malformed_float_service(svc)
|
9094 + | /// .malformed_list_service(svc)
|
7883 9095 | /// /* Set other handlers */
|
7884 9096 | /// .build()
|
7885 9097 | /// .unwrap();
|
7886 9098 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7887 9099 | /// ```
|
7888 9100 | ///
|
7889 - | pub fn malformed_float_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9101 + | pub fn malformed_list_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
7890 9102 | where
|
7891 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedFloat, ServiceExtractors>,
|
9103 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedList, ServiceExtractors>,
|
7892 9104 |
|
7893 9105 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7894 9106 | RestJson<L>,
|
7895 - | crate::operation_shape::MalformedFloat,
|
7896 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedFloat, S>
|
9107 + | crate::operation_shape::MalformedList,
|
9108 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedList, S>
|
7897 9109 | >,
|
7898 9110 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7899 9111 | RestJson<L>,
|
7900 - | crate::operation_shape::MalformedFloat,
|
9112 + | crate::operation_shape::MalformedList,
|
7901 9113 | ModelPl::Output
|
7902 9114 | >,
|
7903 9115 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7904 9116 | RestJson<L>,
|
7905 - | crate::operation_shape::MalformedFloat,
|
9117 + | crate::operation_shape::MalformedList,
|
7906 9118 | <
|
7907 9119 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7908 9120 | as ::aws_smithy_http_server::plugin::Plugin<
|
7909 9121 | RestJson<L>,
|
7910 - | crate::operation_shape::MalformedFloat,
|
9122 + | crate::operation_shape::MalformedList,
|
7911 9123 | ModelPl::Output
|
7912 9124 | >
|
7913 9125 | >::Output
|
7914 9126 | >,
|
7915 9127 |
|
7916 9128 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
7917 9129 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
7918 9130 |
|
7919 9131 | {
|
7920 9132 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
7921 9133 | use ::aws_smithy_http_server::plugin::Plugin;
|
7922 - | let svc = crate::operation_shape::MalformedFloat::from_service(service);
|
9134 + | let svc = crate::operation_shape::MalformedList::from_service(service);
|
7923 9135 | let svc = self.model_plugin.apply(svc);
|
7924 9136 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
7925 9137 | .apply(svc);
|
7926 9138 | let svc = self.http_plugin.apply(svc);
|
7927 - | self.malformed_float_custom(svc)
|
9139 + | self.malformed_list_custom(svc)
|
7928 9140 | }
|
7929 9141 |
|
7930 - | /// Sets the [`MalformedFloat`](crate::operation_shape::MalformedFloat) to a custom [`Service`](tower::Service).
|
9142 + | /// Sets the [`MalformedList`](crate::operation_shape::MalformedList) to a custom [`Service`](tower::Service).
|
7931 9143 | /// not constrained by the Smithy contract.
|
7932 - | fn malformed_float_custom<S>(mut self, svc: S) -> Self
|
9144 + | fn malformed_list_custom<S>(mut self, svc: S) -> Self
|
7933 9145 | where
|
7934 9146 | S: ::tower::Service<
|
7935 9147 | ::http_1x::Request<Body>,
|
7936 9148 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
7937 9149 | Error = ::std::convert::Infallible,
|
7938 9150 | > + Clone
|
7939 9151 | + Send
|
7940 9152 | + 'static,
|
7941 9153 | S::Future: Send + 'static,
|
7942 9154 | {
|
7943 - | self.malformed_float = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
9155 + | self.malformed_list = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
7944 9156 | self
|
7945 9157 | }
|
7946 9158 |
|
7947 - | /// Sets the [`MalformedInteger`](crate::operation_shape::MalformedInteger) operation.
|
9159 + | /// Sets the [`MalformedLong`](crate::operation_shape::MalformedLong) operation.
|
7948 9160 | ///
|
7949 9161 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
7950 9162 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
7951 9163 | ///
|
7952 9164 | /// # Example
|
7953 9165 | ///
|
7954 9166 | /// ```no_run
|
7955 9167 | /// use rest_json::{RestJson, RestJsonConfig};
|
7956 9168 | ///
|
7957 9169 | /// use rest_json::{input, output, error};
|
7958 9170 | ///
|
7959 - | /// async fn handler(input: input::MalformedIntegerInput) -> Result<output::MalformedIntegerOutput, error::MalformedIntegerError> {
|
9171 + | /// async fn handler(input: input::MalformedLongInput) -> Result<output::MalformedLongOutput, error::MalformedLongError> {
|
7960 9172 | /// todo!()
|
7961 9173 | /// }
|
7962 9174 | ///
|
7963 9175 | /// let config = RestJsonConfig::builder().build();
|
7964 9176 | /// let app = RestJson::builder(config)
|
7965 - | /// .malformed_integer(handler)
|
9177 + | /// .malformed_long(handler)
|
7966 9178 | /// /* Set other handlers */
|
7967 9179 | /// .build()
|
7968 9180 | /// .unwrap();
|
7969 9181 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
7970 9182 | /// ```
|
7971 9183 | ///
|
7972 - | pub fn malformed_integer<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9184 + | pub fn malformed_long<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
7973 9185 | where
|
7974 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedInteger, HandlerExtractors>,
|
9186 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedLong, HandlerExtractors>,
|
7975 9187 |
|
7976 9188 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
7977 9189 | RestJson<L>,
|
7978 - | crate::operation_shape::MalformedInteger,
|
7979 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedInteger, HandlerType>
|
9190 + | crate::operation_shape::MalformedLong,
|
9191 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedLong, HandlerType>
|
7980 9192 | >,
|
7981 9193 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
7982 9194 | RestJson<L>,
|
7983 - | crate::operation_shape::MalformedInteger,
|
9195 + | crate::operation_shape::MalformedLong,
|
7984 9196 | ModelPl::Output
|
7985 9197 | >,
|
7986 9198 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
7987 9199 | RestJson<L>,
|
7988 - | crate::operation_shape::MalformedInteger,
|
9200 + | crate::operation_shape::MalformedLong,
|
7989 9201 | <
|
7990 9202 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
7991 9203 | as ::aws_smithy_http_server::plugin::Plugin<
|
7992 9204 | RestJson<L>,
|
7993 - | crate::operation_shape::MalformedInteger,
|
9205 + | crate::operation_shape::MalformedLong,
|
7994 9206 | ModelPl::Output
|
7995 9207 | >
|
7996 9208 | >::Output
|
7997 9209 | >,
|
7998 9210 |
|
7999 9211 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8000 9212 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
8001 9213 |
|
8002 9214 | {
|
8003 9215 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
8004 9216 | use ::aws_smithy_http_server::plugin::Plugin;
|
8005 - | let svc = crate::operation_shape::MalformedInteger::from_handler(handler);
|
9217 + | let svc = crate::operation_shape::MalformedLong::from_handler(handler);
|
8006 9218 | let svc = self.model_plugin.apply(svc);
|
8007 9219 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8008 9220 | .apply(svc);
|
8009 9221 | let svc = self.http_plugin.apply(svc);
|
8010 - | self.malformed_integer_custom(svc)
|
9222 + | self.malformed_long_custom(svc)
|
8011 9223 | }
|
8012 9224 |
|
8013 - | /// Sets the [`MalformedInteger`](crate::operation_shape::MalformedInteger) operation.
|
9225 + | /// Sets the [`MalformedLong`](crate::operation_shape::MalformedLong) operation.
|
8014 9226 | ///
|
8015 9227 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
8016 9228 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
8017 9229 | ///
|
8018 9230 | /// # Example
|
8019 9231 | ///
|
8020 9232 | /// ```no_run
|
8021 9233 | /// use rest_json::{RestJson, RestJsonConfig};
|
8022 9234 | ///
|
8023 9235 | /// use rest_json::{input, output, error};
|
8024 9236 | ///
|
8025 - | /// async fn handler(input: input::MalformedIntegerInput) -> Result<output::MalformedIntegerOutput, error::MalformedIntegerError> {
|
9237 + | /// async fn handler(input: input::MalformedLongInput) -> Result<output::MalformedLongOutput, error::MalformedLongError> {
|
8026 9238 | /// todo!()
|
8027 9239 | /// }
|
8028 9240 | ///
|
8029 9241 | /// let config = RestJsonConfig::builder().build();
|
8030 9242 | /// let svc = ::tower::util::service_fn(handler);
|
8031 9243 | /// let app = RestJson::builder(config)
|
8032 - | /// .malformed_integer_service(svc)
|
9244 + | /// .malformed_long_service(svc)
|
8033 9245 | /// /* Set other handlers */
|
8034 9246 | /// .build()
|
8035 9247 | /// .unwrap();
|
8036 9248 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8037 9249 | /// ```
|
8038 9250 | ///
|
8039 - | pub fn malformed_integer_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9251 + | pub fn malformed_long_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8040 9252 | where
|
8041 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedInteger, ServiceExtractors>,
|
9253 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedLong, ServiceExtractors>,
|
8042 9254 |
|
8043 9255 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
8044 9256 | RestJson<L>,
|
8045 - | crate::operation_shape::MalformedInteger,
|
8046 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedInteger, S>
|
9257 + | crate::operation_shape::MalformedLong,
|
9258 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedLong, S>
|
8047 9259 | >,
|
8048 9260 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
8049 9261 | RestJson<L>,
|
8050 - | crate::operation_shape::MalformedInteger,
|
9262 + | crate::operation_shape::MalformedLong,
|
8051 9263 | ModelPl::Output
|
8052 9264 | >,
|
8053 9265 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
8054 9266 | RestJson<L>,
|
8055 - | crate::operation_shape::MalformedInteger,
|
9267 + | crate::operation_shape::MalformedLong,
|
8056 9268 | <
|
8057 9269 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8058 9270 | as ::aws_smithy_http_server::plugin::Plugin<
|
8059 9271 | RestJson<L>,
|
8060 - | crate::operation_shape::MalformedInteger,
|
9272 + | crate::operation_shape::MalformedLong,
|
8061 9273 | ModelPl::Output
|
8062 9274 | >
|
8063 9275 | >::Output
|
8064 9276 | >,
|
8065 9277 |
|
8066 9278 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8067 9279 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
8068 9280 |
|
8069 9281 | {
|
8070 9282 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
8071 9283 | use ::aws_smithy_http_server::plugin::Plugin;
|
8072 - | let svc = crate::operation_shape::MalformedInteger::from_service(service);
|
9284 + | let svc = crate::operation_shape::MalformedLong::from_service(service);
|
8073 9285 | let svc = self.model_plugin.apply(svc);
|
8074 9286 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8075 9287 | .apply(svc);
|
8076 9288 | let svc = self.http_plugin.apply(svc);
|
8077 - | self.malformed_integer_custom(svc)
|
9289 + | self.malformed_long_custom(svc)
|
8078 9290 | }
|
8079 9291 |
|
8080 - | /// Sets the [`MalformedInteger`](crate::operation_shape::MalformedInteger) to a custom [`Service`](tower::Service).
|
9292 + | /// Sets the [`MalformedLong`](crate::operation_shape::MalformedLong) to a custom [`Service`](tower::Service).
|
8081 9293 | /// not constrained by the Smithy contract.
|
8082 - | fn malformed_integer_custom<S>(mut self, svc: S) -> Self
|
9294 + | fn malformed_long_custom<S>(mut self, svc: S) -> Self
|
8083 9295 | where
|
8084 9296 | S: ::tower::Service<
|
8085 9297 | ::http_1x::Request<Body>,
|
8086 9298 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
8087 9299 | Error = ::std::convert::Infallible,
|
8088 9300 | > + Clone
|
8089 9301 | + Send
|
8090 9302 | + 'static,
|
8091 9303 | S::Future: Send + 'static,
|
8092 9304 | {
|
8093 - | self.malformed_integer = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
9305 + | self.malformed_long = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
8094 9306 | self
|
8095 9307 | }
|
8096 9308 |
|
8097 - | /// Sets the [`MalformedList`](crate::operation_shape::MalformedList) operation.
|
9309 + | /// Sets the [`MalformedMap`](crate::operation_shape::MalformedMap) operation.
|
8098 9310 | ///
|
8099 9311 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
8100 9312 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
8101 9313 | ///
|
8102 9314 | /// # Example
|
8103 9315 | ///
|
8104 9316 | /// ```no_run
|
8105 9317 | /// use rest_json::{RestJson, RestJsonConfig};
|
8106 9318 | ///
|
8107 9319 | /// use rest_json::{input, output, error};
|
8108 9320 | ///
|
8109 - | /// async fn handler(input: input::MalformedListInput) -> output::MalformedListOutput {
|
9321 + | /// async fn handler(input: input::MalformedMapInput) -> output::MalformedMapOutput {
|
8110 9322 | /// todo!()
|
8111 9323 | /// }
|
8112 9324 | ///
|
8113 9325 | /// let config = RestJsonConfig::builder().build();
|
8114 9326 | /// let app = RestJson::builder(config)
|
8115 - | /// .malformed_list(handler)
|
9327 + | /// .malformed_map(handler)
|
8116 9328 | /// /* Set other handlers */
|
8117 9329 | /// .build()
|
8118 9330 | /// .unwrap();
|
8119 9331 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8120 9332 | /// ```
|
8121 9333 | ///
|
8122 - | pub fn malformed_list<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9334 + | pub fn malformed_map<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8123 9335 | where
|
8124 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedList, HandlerExtractors>,
|
9336 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedMap, HandlerExtractors>,
|
8125 9337 |
|
8126 9338 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
8127 9339 | RestJson<L>,
|
8128 - | crate::operation_shape::MalformedList,
|
8129 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedList, HandlerType>
|
9340 + | crate::operation_shape::MalformedMap,
|
9341 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedMap, HandlerType>
|
8130 9342 | >,
|
8131 9343 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
8132 9344 | RestJson<L>,
|
8133 - | crate::operation_shape::MalformedList,
|
9345 + | crate::operation_shape::MalformedMap,
|
8134 9346 | ModelPl::Output
|
8135 9347 | >,
|
8136 9348 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
8137 9349 | RestJson<L>,
|
8138 - | crate::operation_shape::MalformedList,
|
9350 + | crate::operation_shape::MalformedMap,
|
8139 9351 | <
|
8140 9352 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8141 9353 | as ::aws_smithy_http_server::plugin::Plugin<
|
8142 9354 | RestJson<L>,
|
8143 - | crate::operation_shape::MalformedList,
|
9355 + | crate::operation_shape::MalformedMap,
|
8144 9356 | ModelPl::Output
|
8145 9357 | >
|
8146 9358 | >::Output
|
8147 9359 | >,
|
8148 9360 |
|
8149 9361 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8150 9362 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
8151 9363 |
|
8152 9364 | {
|
8153 9365 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
8154 9366 | use ::aws_smithy_http_server::plugin::Plugin;
|
8155 - | let svc = crate::operation_shape::MalformedList::from_handler(handler);
|
9367 + | let svc = crate::operation_shape::MalformedMap::from_handler(handler);
|
8156 9368 | let svc = self.model_plugin.apply(svc);
|
8157 9369 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8158 9370 | .apply(svc);
|
8159 9371 | let svc = self.http_plugin.apply(svc);
|
8160 - | self.malformed_list_custom(svc)
|
9372 + | self.malformed_map_custom(svc)
|
8161 9373 | }
|
8162 9374 |
|
8163 - | /// Sets the [`MalformedList`](crate::operation_shape::MalformedList) operation.
|
9375 + | /// Sets the [`MalformedMap`](crate::operation_shape::MalformedMap) operation.
|
8164 9376 | ///
|
8165 9377 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
8166 9378 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
8167 9379 | ///
|
8168 9380 | /// # Example
|
8169 9381 | ///
|
8170 9382 | /// ```no_run
|
8171 9383 | /// use rest_json::{RestJson, RestJsonConfig};
|
8172 9384 | ///
|
8173 9385 | /// use rest_json::{input, output, error};
|
8174 9386 | ///
|
8175 - | /// async fn handler(input: input::MalformedListInput) -> Result<output::MalformedListOutput, std::convert::Infallible> {
|
9387 + | /// async fn handler(input: input::MalformedMapInput) -> Result<output::MalformedMapOutput, std::convert::Infallible> {
|
8176 9388 | /// todo!()
|
8177 9389 | /// }
|
8178 9390 | ///
|
8179 9391 | /// let config = RestJsonConfig::builder().build();
|
8180 9392 | /// let svc = ::tower::util::service_fn(handler);
|
8181 9393 | /// let app = RestJson::builder(config)
|
8182 - | /// .malformed_list_service(svc)
|
9394 + | /// .malformed_map_service(svc)
|
8183 9395 | /// /* Set other handlers */
|
8184 9396 | /// .build()
|
8185 9397 | /// .unwrap();
|
8186 9398 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8187 9399 | /// ```
|
8188 9400 | ///
|
8189 - | pub fn malformed_list_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9401 + | pub fn malformed_map_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8190 9402 | where
|
8191 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedList, ServiceExtractors>,
|
9403 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedMap, ServiceExtractors>,
|
8192 9404 |
|
8193 9405 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
8194 9406 | RestJson<L>,
|
8195 - | crate::operation_shape::MalformedList,
|
8196 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedList, S>
|
9407 + | crate::operation_shape::MalformedMap,
|
9408 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedMap, S>
|
8197 9409 | >,
|
8198 9410 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
8199 9411 | RestJson<L>,
|
8200 - | crate::operation_shape::MalformedList,
|
9412 + | crate::operation_shape::MalformedMap,
|
8201 9413 | ModelPl::Output
|
8202 9414 | >,
|
8203 9415 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
8204 9416 | RestJson<L>,
|
8205 - | crate::operation_shape::MalformedList,
|
9417 + | crate::operation_shape::MalformedMap,
|
8206 9418 | <
|
8207 9419 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8208 9420 | as ::aws_smithy_http_server::plugin::Plugin<
|
8209 9421 | RestJson<L>,
|
8210 - | crate::operation_shape::MalformedList,
|
9422 + | crate::operation_shape::MalformedMap,
|
8211 9423 | ModelPl::Output
|
8212 9424 | >
|
8213 9425 | >::Output
|
8214 9426 | >,
|
8215 9427 |
|
8216 9428 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8217 9429 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
8218 9430 |
|
8219 9431 | {
|
8220 9432 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
8221 9433 | use ::aws_smithy_http_server::plugin::Plugin;
|
8222 - | let svc = crate::operation_shape::MalformedList::from_service(service);
|
9434 + | let svc = crate::operation_shape::MalformedMap::from_service(service);
|
8223 9435 | let svc = self.model_plugin.apply(svc);
|
8224 9436 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8225 9437 | .apply(svc);
|
8226 9438 | let svc = self.http_plugin.apply(svc);
|
8227 - | self.malformed_list_custom(svc)
|
9439 + | self.malformed_map_custom(svc)
|
8228 9440 | }
|
8229 9441 |
|
8230 - | /// Sets the [`MalformedList`](crate::operation_shape::MalformedList) to a custom [`Service`](tower::Service).
|
9442 + | /// Sets the [`MalformedMap`](crate::operation_shape::MalformedMap) to a custom [`Service`](tower::Service).
|
8231 9443 | /// not constrained by the Smithy contract.
|
8232 - | fn malformed_list_custom<S>(mut self, svc: S) -> Self
|
9444 + | fn malformed_map_custom<S>(mut self, svc: S) -> Self
|
8233 9445 | where
|
8234 9446 | S: ::tower::Service<
|
8235 9447 | ::http_1x::Request<Body>,
|
8236 9448 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
8237 9449 | Error = ::std::convert::Infallible,
|
8238 9450 | > + Clone
|
8239 9451 | + Send
|
8240 9452 | + 'static,
|
8241 9453 | S::Future: Send + 'static,
|
8242 9454 | {
|
8243 - | self.malformed_list = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
9455 + | self.malformed_map = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
8244 9456 | self
|
8245 9457 | }
|
8246 9458 |
|
8247 - | /// Sets the [`MalformedLong`](crate::operation_shape::MalformedLong) operation.
|
9459 + | /// Sets the [`MalformedRequestBody`](crate::operation_shape::MalformedRequestBody) operation.
|
8248 9460 | ///
|
8249 9461 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
8250 9462 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
8251 9463 | ///
|
8252 9464 | /// # Example
|
8253 9465 | ///
|
8254 9466 | /// ```no_run
|
8255 9467 | /// use rest_json::{RestJson, RestJsonConfig};
|
8256 9468 | ///
|
8257 9469 | /// use rest_json::{input, output, error};
|
8258 9470 | ///
|
8259 - | /// async fn handler(input: input::MalformedLongInput) -> Result<output::MalformedLongOutput, error::MalformedLongError> {
|
9471 + | /// async fn handler(input: input::MalformedRequestBodyInput) -> output::MalformedRequestBodyOutput {
|
8260 9472 | /// todo!()
|
8261 9473 | /// }
|
8262 9474 | ///
|
8263 9475 | /// let config = RestJsonConfig::builder().build();
|
8264 9476 | /// let app = RestJson::builder(config)
|
8265 - | /// .malformed_long(handler)
|
9477 + | /// .malformed_request_body(handler)
|
8266 9478 | /// /* Set other handlers */
|
8267 9479 | /// .build()
|
8268 9480 | /// .unwrap();
|
8269 9481 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8270 9482 | /// ```
|
8271 9483 | ///
|
8272 - | pub fn malformed_long<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9484 + | pub fn malformed_request_body<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8273 9485 | where
|
8274 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedLong, HandlerExtractors>,
|
9486 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedRequestBody, HandlerExtractors>,
|
8275 9487 |
|
8276 9488 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
8277 9489 | RestJson<L>,
|
8278 - | crate::operation_shape::MalformedLong,
|
8279 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedLong, HandlerType>
|
9490 + | crate::operation_shape::MalformedRequestBody,
|
9491 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedRequestBody, HandlerType>
|
8280 9492 | >,
|
8281 9493 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
8282 9494 | RestJson<L>,
|
8283 - | crate::operation_shape::MalformedLong,
|
9495 + | crate::operation_shape::MalformedRequestBody,
|
8284 9496 | ModelPl::Output
|
8285 9497 | >,
|
8286 9498 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
8287 9499 | RestJson<L>,
|
8288 - | crate::operation_shape::MalformedLong,
|
9500 + | crate::operation_shape::MalformedRequestBody,
|
8289 9501 | <
|
8290 9502 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8291 9503 | as ::aws_smithy_http_server::plugin::Plugin<
|
8292 9504 | RestJson<L>,
|
8293 - | crate::operation_shape::MalformedLong,
|
9505 + | crate::operation_shape::MalformedRequestBody,
|
8294 9506 | ModelPl::Output
|
8295 9507 | >
|
8296 9508 | >::Output
|
8297 9509 | >,
|
8298 9510 |
|
8299 9511 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8300 9512 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
8301 9513 |
|
8302 9514 | {
|
8303 9515 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
8304 9516 | use ::aws_smithy_http_server::plugin::Plugin;
|
8305 - | let svc = crate::operation_shape::MalformedLong::from_handler(handler);
|
9517 + | let svc = crate::operation_shape::MalformedRequestBody::from_handler(handler);
|
8306 9518 | let svc = self.model_plugin.apply(svc);
|
8307 9519 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8308 9520 | .apply(svc);
|
8309 9521 | let svc = self.http_plugin.apply(svc);
|
8310 - | self.malformed_long_custom(svc)
|
9522 + | self.malformed_request_body_custom(svc)
|
8311 9523 | }
|
8312 9524 |
|
8313 - | /// Sets the [`MalformedLong`](crate::operation_shape::MalformedLong) operation.
|
9525 + | /// Sets the [`MalformedRequestBody`](crate::operation_shape::MalformedRequestBody) operation.
|
8314 9526 | ///
|
8315 9527 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
8316 9528 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
8317 9529 | ///
|
8318 9530 | /// # Example
|
8319 9531 | ///
|
8320 9532 | /// ```no_run
|
8321 9533 | /// use rest_json::{RestJson, RestJsonConfig};
|
8322 9534 | ///
|
8323 9535 | /// use rest_json::{input, output, error};
|
8324 9536 | ///
|
8325 - | /// async fn handler(input: input::MalformedLongInput) -> Result<output::MalformedLongOutput, error::MalformedLongError> {
|
9537 + | /// async fn handler(input: input::MalformedRequestBodyInput) -> Result<output::MalformedRequestBodyOutput, std::convert::Infallible> {
|
8326 9538 | /// todo!()
|
8327 9539 | /// }
|
8328 9540 | ///
|
8329 9541 | /// let config = RestJsonConfig::builder().build();
|
8330 9542 | /// let svc = ::tower::util::service_fn(handler);
|
8331 9543 | /// let app = RestJson::builder(config)
|
8332 - | /// .malformed_long_service(svc)
|
9544 + | /// .malformed_request_body_service(svc)
|
8333 9545 | /// /* Set other handlers */
|
8334 9546 | /// .build()
|
8335 9547 | /// .unwrap();
|
8336 9548 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8337 9549 | /// ```
|
8338 9550 | ///
|
8339 - | pub fn malformed_long_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9551 + | pub fn malformed_request_body_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8340 9552 | where
|
8341 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedLong, ServiceExtractors>,
|
9553 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedRequestBody, ServiceExtractors>,
|
8342 9554 |
|
8343 9555 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
8344 9556 | RestJson<L>,
|
8345 - | crate::operation_shape::MalformedLong,
|
8346 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedLong, S>
|
9557 + | crate::operation_shape::MalformedRequestBody,
|
9558 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedRequestBody, S>
|
8347 9559 | >,
|
8348 9560 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
8349 9561 | RestJson<L>,
|
8350 - | crate::operation_shape::MalformedLong,
|
9562 + | crate::operation_shape::MalformedRequestBody,
|
8351 9563 | ModelPl::Output
|
8352 9564 | >,
|
8353 9565 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
8354 9566 | RestJson<L>,
|
8355 - | crate::operation_shape::MalformedLong,
|
9567 + | crate::operation_shape::MalformedRequestBody,
|
8356 9568 | <
|
8357 9569 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8358 9570 | as ::aws_smithy_http_server::plugin::Plugin<
|
8359 9571 | RestJson<L>,
|
8360 - | crate::operation_shape::MalformedLong,
|
9572 + | crate::operation_shape::MalformedRequestBody,
|
8361 9573 | ModelPl::Output
|
8362 9574 | >
|
8363 9575 | >::Output
|
8364 9576 | >,
|
8365 9577 |
|
8366 9578 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8367 9579 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
8368 9580 |
|
8369 9581 | {
|
8370 9582 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
8371 9583 | use ::aws_smithy_http_server::plugin::Plugin;
|
8372 - | let svc = crate::operation_shape::MalformedLong::from_service(service);
|
9584 + | let svc = crate::operation_shape::MalformedRequestBody::from_service(service);
|
8373 9585 | let svc = self.model_plugin.apply(svc);
|
8374 9586 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8375 9587 | .apply(svc);
|
8376 9588 | let svc = self.http_plugin.apply(svc);
|
8377 - | self.malformed_long_custom(svc)
|
9589 + | self.malformed_request_body_custom(svc)
|
8378 9590 | }
|
8379 9591 |
|
8380 - | /// Sets the [`MalformedLong`](crate::operation_shape::MalformedLong) to a custom [`Service`](tower::Service).
|
9592 + | /// Sets the [`MalformedRequestBody`](crate::operation_shape::MalformedRequestBody) to a custom [`Service`](tower::Service).
|
8381 9593 | /// not constrained by the Smithy contract.
|
8382 - | fn malformed_long_custom<S>(mut self, svc: S) -> Self
|
9594 + | fn malformed_request_body_custom<S>(mut self, svc: S) -> Self
|
8383 9595 | where
|
8384 9596 | S: ::tower::Service<
|
8385 9597 | ::http_1x::Request<Body>,
|
8386 9598 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
8387 9599 | Error = ::std::convert::Infallible,
|
8388 9600 | > + Clone
|
8389 9601 | + Send
|
8390 9602 | + 'static,
|
8391 9603 | S::Future: Send + 'static,
|
8392 9604 | {
|
8393 - | self.malformed_long = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
9605 + | self.malformed_request_body = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
8394 9606 | self
|
8395 9607 | }
|
8396 9608 |
|
8397 - | /// Sets the [`MalformedMap`](crate::operation_shape::MalformedMap) operation.
|
9609 + | /// Sets the [`MalformedShort`](crate::operation_shape::MalformedShort) operation.
|
8398 9610 | ///
|
8399 9611 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
8400 9612 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
8401 9613 | ///
|
8402 9614 | /// # Example
|
8403 9615 | ///
|
8404 9616 | /// ```no_run
|
8405 9617 | /// use rest_json::{RestJson, RestJsonConfig};
|
8406 9618 | ///
|
8407 9619 | /// use rest_json::{input, output, error};
|
8408 9620 | ///
|
8409 - | /// async fn handler(input: input::MalformedMapInput) -> output::MalformedMapOutput {
|
9621 + | /// async fn handler(input: input::MalformedShortInput) -> Result<output::MalformedShortOutput, error::MalformedShortError> {
|
8410 9622 | /// todo!()
|
8411 9623 | /// }
|
8412 9624 | ///
|
8413 9625 | /// let config = RestJsonConfig::builder().build();
|
8414 9626 | /// let app = RestJson::builder(config)
|
8415 - | /// .malformed_map(handler)
|
9627 + | /// .malformed_short(handler)
|
8416 9628 | /// /* Set other handlers */
|
8417 9629 | /// .build()
|
8418 9630 | /// .unwrap();
|
8419 9631 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8420 9632 | /// ```
|
8421 9633 | ///
|
8422 - | pub fn malformed_map<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9634 + | pub fn malformed_short<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8423 9635 | where
|
8424 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedMap, HandlerExtractors>,
|
9636 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedShort, HandlerExtractors>,
|
8425 9637 |
|
8426 9638 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
8427 9639 | RestJson<L>,
|
8428 - | crate::operation_shape::MalformedMap,
|
8429 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedMap, HandlerType>
|
9640 + | crate::operation_shape::MalformedShort,
|
9641 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedShort, HandlerType>
|
8430 9642 | >,
|
8431 9643 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
8432 9644 | RestJson<L>,
|
8433 - | crate::operation_shape::MalformedMap,
|
9645 + | crate::operation_shape::MalformedShort,
|
8434 9646 | ModelPl::Output
|
8435 9647 | >,
|
8436 9648 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
8437 9649 | RestJson<L>,
|
8438 - | crate::operation_shape::MalformedMap,
|
9650 + | crate::operation_shape::MalformedShort,
|
8439 9651 | <
|
8440 9652 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8441 9653 | as ::aws_smithy_http_server::plugin::Plugin<
|
8442 9654 | RestJson<L>,
|
8443 - | crate::operation_shape::MalformedMap,
|
9655 + | crate::operation_shape::MalformedShort,
|
8444 9656 | ModelPl::Output
|
8445 9657 | >
|
8446 9658 | >::Output
|
8447 9659 | >,
|
8448 9660 |
|
8449 9661 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8450 9662 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
8451 9663 |
|
8452 9664 | {
|
8453 9665 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
8454 9666 | use ::aws_smithy_http_server::plugin::Plugin;
|
8455 - | let svc = crate::operation_shape::MalformedMap::from_handler(handler);
|
9667 + | let svc = crate::operation_shape::MalformedShort::from_handler(handler);
|
8456 9668 | let svc = self.model_plugin.apply(svc);
|
8457 9669 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8458 9670 | .apply(svc);
|
8459 9671 | let svc = self.http_plugin.apply(svc);
|
8460 - | self.malformed_map_custom(svc)
|
9672 + | self.malformed_short_custom(svc)
|
8461 9673 | }
|
8462 9674 |
|
8463 - | /// Sets the [`MalformedMap`](crate::operation_shape::MalformedMap) operation.
|
9675 + | /// Sets the [`MalformedShort`](crate::operation_shape::MalformedShort) operation.
|
8464 9676 | ///
|
8465 9677 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
8466 9678 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
8467 9679 | ///
|
8468 9680 | /// # Example
|
8469 9681 | ///
|
8470 9682 | /// ```no_run
|
8471 9683 | /// use rest_json::{RestJson, RestJsonConfig};
|
8472 9684 | ///
|
8473 9685 | /// use rest_json::{input, output, error};
|
8474 9686 | ///
|
8475 - | /// async fn handler(input: input::MalformedMapInput) -> Result<output::MalformedMapOutput, std::convert::Infallible> {
|
9687 + | /// async fn handler(input: input::MalformedShortInput) -> Result<output::MalformedShortOutput, error::MalformedShortError> {
|
8476 9688 | /// todo!()
|
8477 9689 | /// }
|
8478 9690 | ///
|
8479 9691 | /// let config = RestJsonConfig::builder().build();
|
8480 9692 | /// let svc = ::tower::util::service_fn(handler);
|
8481 9693 | /// let app = RestJson::builder(config)
|
8482 - | /// .malformed_map_service(svc)
|
9694 + | /// .malformed_short_service(svc)
|
8483 9695 | /// /* Set other handlers */
|
8484 9696 | /// .build()
|
8485 9697 | /// .unwrap();
|
8486 9698 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8487 9699 | /// ```
|
8488 9700 | ///
|
8489 - | pub fn malformed_map_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9701 + | pub fn malformed_short_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8490 9702 | where
|
8491 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedMap, ServiceExtractors>,
|
9703 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedShort, ServiceExtractors>,
|
8492 9704 |
|
8493 9705 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
8494 9706 | RestJson<L>,
|
8495 - | crate::operation_shape::MalformedMap,
|
8496 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedMap, S>
|
9707 + | crate::operation_shape::MalformedShort,
|
9708 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedShort, S>
|
8497 9709 | >,
|
8498 9710 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
8499 9711 | RestJson<L>,
|
8500 - | crate::operation_shape::MalformedMap,
|
9712 + | crate::operation_shape::MalformedShort,
|
8501 9713 | ModelPl::Output
|
8502 9714 | >,
|
8503 9715 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
8504 9716 | RestJson<L>,
|
8505 - | crate::operation_shape::MalformedMap,
|
9717 + | crate::operation_shape::MalformedShort,
|
8506 9718 | <
|
8507 9719 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8508 9720 | as ::aws_smithy_http_server::plugin::Plugin<
|
8509 9721 | RestJson<L>,
|
8510 - | crate::operation_shape::MalformedMap,
|
9722 + | crate::operation_shape::MalformedShort,
|
8511 9723 | ModelPl::Output
|
8512 9724 | >
|
8513 9725 | >::Output
|
8514 9726 | >,
|
8515 9727 |
|
8516 9728 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8517 9729 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
8518 9730 |
|
8519 9731 | {
|
8520 9732 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
8521 9733 | use ::aws_smithy_http_server::plugin::Plugin;
|
8522 - | let svc = crate::operation_shape::MalformedMap::from_service(service);
|
9734 + | let svc = crate::operation_shape::MalformedShort::from_service(service);
|
8523 9735 | let svc = self.model_plugin.apply(svc);
|
8524 9736 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8525 9737 | .apply(svc);
|
8526 9738 | let svc = self.http_plugin.apply(svc);
|
8527 - | self.malformed_map_custom(svc)
|
9739 + | self.malformed_short_custom(svc)
|
8528 9740 | }
|
8529 9741 |
|
8530 - | /// Sets the [`MalformedMap`](crate::operation_shape::MalformedMap) to a custom [`Service`](tower::Service).
|
9742 + | /// Sets the [`MalformedShort`](crate::operation_shape::MalformedShort) to a custom [`Service`](tower::Service).
|
8531 9743 | /// not constrained by the Smithy contract.
|
8532 - | fn malformed_map_custom<S>(mut self, svc: S) -> Self
|
9744 + | fn malformed_short_custom<S>(mut self, svc: S) -> Self
|
8533 9745 | where
|
8534 9746 | S: ::tower::Service<
|
8535 9747 | ::http_1x::Request<Body>,
|
8536 9748 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
8537 9749 | Error = ::std::convert::Infallible,
|
8538 9750 | > + Clone
|
8539 9751 | + Send
|
8540 9752 | + 'static,
|
8541 9753 | S::Future: Send + 'static,
|
8542 9754 | {
|
8543 - | self.malformed_map = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
9755 + | self.malformed_short = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
8544 9756 | self
|
8545 9757 | }
|
8546 9758 |
|
8547 - | /// Sets the [`MalformedRequestBody`](crate::operation_shape::MalformedRequestBody) operation.
|
9759 + | /// Sets the [`MalformedString`](crate::operation_shape::MalformedString) operation.
|
8548 9760 | ///
|
8549 9761 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
8550 9762 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
8551 9763 | ///
|
8552 9764 | /// # Example
|
8553 9765 | ///
|
8554 9766 | /// ```no_run
|
8555 9767 | /// use rest_json::{RestJson, RestJsonConfig};
|
8556 9768 | ///
|
8557 9769 | /// use rest_json::{input, output, error};
|
8558 9770 | ///
|
8559 - | /// async fn handler(input: input::MalformedRequestBodyInput) -> output::MalformedRequestBodyOutput {
|
9771 + | /// async fn handler(input: input::MalformedStringInput) -> output::MalformedStringOutput {
|
8560 9772 | /// todo!()
|
8561 9773 | /// }
|
8562 9774 | ///
|
8563 9775 | /// let config = RestJsonConfig::builder().build();
|
8564 9776 | /// let app = RestJson::builder(config)
|
8565 - | /// .malformed_request_body(handler)
|
9777 + | /// .malformed_string(handler)
|
8566 9778 | /// /* Set other handlers */
|
8567 9779 | /// .build()
|
8568 9780 | /// .unwrap();
|
8569 9781 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8570 9782 | /// ```
|
8571 9783 | ///
|
8572 - | pub fn malformed_request_body<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9784 + | pub fn malformed_string<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8573 9785 | where
|
8574 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedRequestBody, HandlerExtractors>,
|
9786 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedString, HandlerExtractors>,
|
8575 9787 |
|
8576 9788 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
8577 9789 | RestJson<L>,
|
8578 - | crate::operation_shape::MalformedRequestBody,
|
8579 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedRequestBody, HandlerType>
|
9790 + | crate::operation_shape::MalformedString,
|
9791 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedString, HandlerType>
|
8580 9792 | >,
|
8581 9793 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
8582 9794 | RestJson<L>,
|
8583 - | crate::operation_shape::MalformedRequestBody,
|
9795 + | crate::operation_shape::MalformedString,
|
8584 9796 | ModelPl::Output
|
8585 9797 | >,
|
8586 9798 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
8587 9799 | RestJson<L>,
|
8588 - | crate::operation_shape::MalformedRequestBody,
|
9800 + | crate::operation_shape::MalformedString,
|
8589 9801 | <
|
8590 9802 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8591 9803 | as ::aws_smithy_http_server::plugin::Plugin<
|
8592 9804 | RestJson<L>,
|
8593 - | crate::operation_shape::MalformedRequestBody,
|
9805 + | crate::operation_shape::MalformedString,
|
8594 9806 | ModelPl::Output
|
8595 9807 | >
|
8596 9808 | >::Output
|
8597 9809 | >,
|
8598 9810 |
|
8599 9811 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8600 9812 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
8601 9813 |
|
8602 9814 | {
|
8603 9815 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
8604 9816 | use ::aws_smithy_http_server::plugin::Plugin;
|
8605 - | let svc = crate::operation_shape::MalformedRequestBody::from_handler(handler);
|
9817 + | let svc = crate::operation_shape::MalformedString::from_handler(handler);
|
8606 9818 | let svc = self.model_plugin.apply(svc);
|
8607 9819 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8608 9820 | .apply(svc);
|
8609 9821 | let svc = self.http_plugin.apply(svc);
|
8610 - | self.malformed_request_body_custom(svc)
|
9822 + | self.malformed_string_custom(svc)
|
8611 9823 | }
|
8612 9824 |
|
8613 - | /// Sets the [`MalformedRequestBody`](crate::operation_shape::MalformedRequestBody) operation.
|
9825 + | /// Sets the [`MalformedString`](crate::operation_shape::MalformedString) operation.
|
8614 9826 | ///
|
8615 9827 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
8616 9828 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
8617 9829 | ///
|
8618 9830 | /// # Example
|
8619 9831 | ///
|
8620 9832 | /// ```no_run
|
8621 9833 | /// use rest_json::{RestJson, RestJsonConfig};
|
8622 9834 | ///
|
8623 9835 | /// use rest_json::{input, output, error};
|
8624 9836 | ///
|
8625 - | /// async fn handler(input: input::MalformedRequestBodyInput) -> Result<output::MalformedRequestBodyOutput, std::convert::Infallible> {
|
9837 + | /// async fn handler(input: input::MalformedStringInput) -> Result<output::MalformedStringOutput, std::convert::Infallible> {
|
8626 9838 | /// todo!()
|
8627 9839 | /// }
|
8628 9840 | ///
|
8629 9841 | /// let config = RestJsonConfig::builder().build();
|
8630 9842 | /// let svc = ::tower::util::service_fn(handler);
|
8631 9843 | /// let app = RestJson::builder(config)
|
8632 - | /// .malformed_request_body_service(svc)
|
9844 + | /// .malformed_string_service(svc)
|
8633 9845 | /// /* Set other handlers */
|
8634 9846 | /// .build()
|
8635 9847 | /// .unwrap();
|
8636 9848 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8637 9849 | /// ```
|
8638 9850 | ///
|
8639 - | pub fn malformed_request_body_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9851 + | pub fn malformed_string_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8640 9852 | where
|
8641 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedRequestBody, ServiceExtractors>,
|
9853 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedString, ServiceExtractors>,
|
8642 9854 |
|
8643 9855 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
8644 9856 | RestJson<L>,
|
8645 - | crate::operation_shape::MalformedRequestBody,
|
8646 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedRequestBody, S>
|
9857 + | crate::operation_shape::MalformedString,
|
9858 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedString, S>
|
8647 9859 | >,
|
8648 9860 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
8649 9861 | RestJson<L>,
|
8650 - | crate::operation_shape::MalformedRequestBody,
|
9862 + | crate::operation_shape::MalformedString,
|
8651 9863 | ModelPl::Output
|
8652 9864 | >,
|
8653 9865 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
8654 9866 | RestJson<L>,
|
8655 - | crate::operation_shape::MalformedRequestBody,
|
9867 + | crate::operation_shape::MalformedString,
|
8656 9868 | <
|
8657 9869 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8658 9870 | as ::aws_smithy_http_server::plugin::Plugin<
|
8659 9871 | RestJson<L>,
|
8660 - | crate::operation_shape::MalformedRequestBody,
|
9872 + | crate::operation_shape::MalformedString,
|
8661 9873 | ModelPl::Output
|
8662 9874 | >
|
8663 9875 | >::Output
|
8664 9876 | >,
|
8665 9877 |
|
8666 9878 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8667 9879 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
8668 9880 |
|
8669 9881 | {
|
8670 9882 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
8671 9883 | use ::aws_smithy_http_server::plugin::Plugin;
|
8672 - | let svc = crate::operation_shape::MalformedRequestBody::from_service(service);
|
9884 + | let svc = crate::operation_shape::MalformedString::from_service(service);
|
8673 9885 | let svc = self.model_plugin.apply(svc);
|
8674 9886 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8675 9887 | .apply(svc);
|
8676 9888 | let svc = self.http_plugin.apply(svc);
|
8677 - | self.malformed_request_body_custom(svc)
|
9889 + | self.malformed_string_custom(svc)
|
8678 9890 | }
|
8679 9891 |
|
8680 - | /// Sets the [`MalformedRequestBody`](crate::operation_shape::MalformedRequestBody) to a custom [`Service`](tower::Service).
|
9892 + | /// Sets the [`MalformedString`](crate::operation_shape::MalformedString) to a custom [`Service`](tower::Service).
|
8681 9893 | /// not constrained by the Smithy contract.
|
8682 - | fn malformed_request_body_custom<S>(mut self, svc: S) -> Self
|
9894 + | fn malformed_string_custom<S>(mut self, svc: S) -> Self
|
8683 9895 | where
|
8684 9896 | S: ::tower::Service<
|
8685 9897 | ::http_1x::Request<Body>,
|
8686 9898 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
8687 9899 | Error = ::std::convert::Infallible,
|
8688 9900 | > + Clone
|
8689 9901 | + Send
|
8690 9902 | + 'static,
|
8691 9903 | S::Future: Send + 'static,
|
8692 9904 | {
|
8693 - | self.malformed_request_body = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
9905 + | self.malformed_string = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
8694 9906 | self
|
8695 9907 | }
|
8696 9908 |
|
8697 - | /// Sets the [`MalformedShort`](crate::operation_shape::MalformedShort) operation.
|
9909 + | /// Sets the [`MalformedTimestampBodyDateTime`](crate::operation_shape::MalformedTimestampBodyDateTime) operation.
|
8698 9910 | ///
|
8699 9911 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
8700 9912 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
8701 9913 | ///
|
8702 9914 | /// # Example
|
8703 9915 | ///
|
8704 9916 | /// ```no_run
|
8705 9917 | /// use rest_json::{RestJson, RestJsonConfig};
|
8706 9918 | ///
|
8707 9919 | /// use rest_json::{input, output, error};
|
8708 9920 | ///
|
8709 - | /// async fn handler(input: input::MalformedShortInput) -> Result<output::MalformedShortOutput, error::MalformedShortError> {
|
9921 + | /// async fn handler(input: input::MalformedTimestampBodyDateTimeInput) -> Result<output::MalformedTimestampBodyDateTimeOutput, error::MalformedTimestampBodyDateTimeError> {
|
8710 9922 | /// todo!()
|
8711 9923 | /// }
|
8712 9924 | ///
|
8713 9925 | /// let config = RestJsonConfig::builder().build();
|
8714 9926 | /// let app = RestJson::builder(config)
|
8715 - | /// .malformed_short(handler)
|
9927 + | /// .malformed_timestamp_body_date_time(handler)
|
8716 9928 | /// /* Set other handlers */
|
8717 9929 | /// .build()
|
8718 9930 | /// .unwrap();
|
8719 9931 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8720 9932 | /// ```
|
8721 9933 | ///
|
8722 - | pub fn malformed_short<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9934 + | pub fn malformed_timestamp_body_date_time<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8723 9935 | where
|
8724 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedShort, HandlerExtractors>,
|
9936 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampBodyDateTime, HandlerExtractors>,
|
8725 9937 |
|
8726 9938 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
8727 9939 | RestJson<L>,
|
8728 - | crate::operation_shape::MalformedShort,
|
8729 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedShort, HandlerType>
|
9940 + | crate::operation_shape::MalformedTimestampBodyDateTime,
|
9941 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampBodyDateTime, HandlerType>
|
8730 9942 | >,
|
8731 9943 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
8732 9944 | RestJson<L>,
|
8733 - | crate::operation_shape::MalformedShort,
|
9945 + | crate::operation_shape::MalformedTimestampBodyDateTime,
|
8734 9946 | ModelPl::Output
|
8735 9947 | >,
|
8736 9948 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
8737 9949 | RestJson<L>,
|
8738 - | crate::operation_shape::MalformedShort,
|
9950 + | crate::operation_shape::MalformedTimestampBodyDateTime,
|
8739 9951 | <
|
8740 9952 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8741 9953 | as ::aws_smithy_http_server::plugin::Plugin<
|
8742 9954 | RestJson<L>,
|
8743 - | crate::operation_shape::MalformedShort,
|
9955 + | crate::operation_shape::MalformedTimestampBodyDateTime,
|
8744 9956 | ModelPl::Output
|
8745 9957 | >
|
8746 9958 | >::Output
|
8747 9959 | >,
|
8748 9960 |
|
8749 9961 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8750 9962 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
8751 9963 |
|
8752 9964 | {
|
8753 9965 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
8754 9966 | use ::aws_smithy_http_server::plugin::Plugin;
|
8755 - | let svc = crate::operation_shape::MalformedShort::from_handler(handler);
|
9967 + | let svc = crate::operation_shape::MalformedTimestampBodyDateTime::from_handler(handler);
|
8756 9968 | let svc = self.model_plugin.apply(svc);
|
8757 9969 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8758 9970 | .apply(svc);
|
8759 9971 | let svc = self.http_plugin.apply(svc);
|
8760 - | self.malformed_short_custom(svc)
|
9972 + | self.malformed_timestamp_body_date_time_custom(svc)
|
8761 9973 | }
|
8762 9974 |
|
8763 - | /// Sets the [`MalformedShort`](crate::operation_shape::MalformedShort) operation.
|
9975 + | /// Sets the [`MalformedTimestampBodyDateTime`](crate::operation_shape::MalformedTimestampBodyDateTime) operation.
|
8764 9976 | ///
|
8765 9977 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
8766 9978 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
8767 9979 | ///
|
8768 9980 | /// # Example
|
8769 9981 | ///
|
8770 9982 | /// ```no_run
|
8771 9983 | /// use rest_json::{RestJson, RestJsonConfig};
|
8772 9984 | ///
|
8773 9985 | /// use rest_json::{input, output, error};
|
8774 9986 | ///
|
8775 - | /// async fn handler(input: input::MalformedShortInput) -> Result<output::MalformedShortOutput, error::MalformedShortError> {
|
9987 + | /// async fn handler(input: input::MalformedTimestampBodyDateTimeInput) -> Result<output::MalformedTimestampBodyDateTimeOutput, error::MalformedTimestampBodyDateTimeError> {
|
8776 9988 | /// todo!()
|
8777 9989 | /// }
|
8778 9990 | ///
|
8779 9991 | /// let config = RestJsonConfig::builder().build();
|
8780 9992 | /// let svc = ::tower::util::service_fn(handler);
|
8781 9993 | /// let app = RestJson::builder(config)
|
8782 - | /// .malformed_short_service(svc)
|
9994 + | /// .malformed_timestamp_body_date_time_service(svc)
|
8783 9995 | /// /* Set other handlers */
|
8784 9996 | /// .build()
|
8785 9997 | /// .unwrap();
|
8786 9998 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8787 9999 | /// ```
|
8788 10000 | ///
|
8789 - | pub fn malformed_short_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10001 + | pub fn malformed_timestamp_body_date_time_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8790 10002 | where
|
8791 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedShort, ServiceExtractors>,
|
10003 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampBodyDateTime, ServiceExtractors>,
|
8792 10004 |
|
8793 10005 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
8794 10006 | RestJson<L>,
|
8795 - | crate::operation_shape::MalformedShort,
|
8796 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedShort, S>
|
10007 + | crate::operation_shape::MalformedTimestampBodyDateTime,
|
10008 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampBodyDateTime, S>
|
8797 10009 | >,
|
8798 10010 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
8799 10011 | RestJson<L>,
|
8800 - | crate::operation_shape::MalformedShort,
|
10012 + | crate::operation_shape::MalformedTimestampBodyDateTime,
|
8801 10013 | ModelPl::Output
|
8802 10014 | >,
|
8803 10015 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
8804 10016 | RestJson<L>,
|
8805 - | crate::operation_shape::MalformedShort,
|
10017 + | crate::operation_shape::MalformedTimestampBodyDateTime,
|
8806 10018 | <
|
8807 10019 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8808 10020 | as ::aws_smithy_http_server::plugin::Plugin<
|
8809 10021 | RestJson<L>,
|
8810 - | crate::operation_shape::MalformedShort,
|
10022 + | crate::operation_shape::MalformedTimestampBodyDateTime,
|
8811 10023 | ModelPl::Output
|
8812 10024 | >
|
8813 10025 | >::Output
|
8814 10026 | >,
|
8815 10027 |
|
8816 10028 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8817 10029 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
8818 10030 |
|
8819 10031 | {
|
8820 10032 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
8821 10033 | use ::aws_smithy_http_server::plugin::Plugin;
|
8822 - | let svc = crate::operation_shape::MalformedShort::from_service(service);
|
10034 + | let svc = crate::operation_shape::MalformedTimestampBodyDateTime::from_service(service);
|
8823 10035 | let svc = self.model_plugin.apply(svc);
|
8824 10036 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8825 10037 | .apply(svc);
|
8826 10038 | let svc = self.http_plugin.apply(svc);
|
8827 - | self.malformed_short_custom(svc)
|
10039 + | self.malformed_timestamp_body_date_time_custom(svc)
|
8828 10040 | }
|
8829 10041 |
|
8830 - | /// Sets the [`MalformedShort`](crate::operation_shape::MalformedShort) to a custom [`Service`](tower::Service).
|
10042 + | /// Sets the [`MalformedTimestampBodyDateTime`](crate::operation_shape::MalformedTimestampBodyDateTime) to a custom [`Service`](tower::Service).
|
8831 10043 | /// not constrained by the Smithy contract.
|
8832 - | fn malformed_short_custom<S>(mut self, svc: S) -> Self
|
10044 + | fn malformed_timestamp_body_date_time_custom<S>(mut self, svc: S) -> Self
|
8833 10045 | where
|
8834 10046 | S: ::tower::Service<
|
8835 10047 | ::http_1x::Request<Body>,
|
8836 10048 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
8837 10049 | Error = ::std::convert::Infallible,
|
8838 10050 | > + Clone
|
8839 10051 | + Send
|
8840 10052 | + 'static,
|
8841 10053 | S::Future: Send + 'static,
|
8842 10054 | {
|
8843 - | self.malformed_short = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
10055 + | self.malformed_timestamp_body_date_time =
|
10056 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
8844 10057 | self
|
8845 10058 | }
|
8846 10059 |
|
8847 - | /// Sets the [`MalformedString`](crate::operation_shape::MalformedString) operation.
|
10060 + | /// Sets the [`MalformedTimestampBodyDefault`](crate::operation_shape::MalformedTimestampBodyDefault) operation.
|
8848 10061 | ///
|
8849 10062 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
8850 10063 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
8851 10064 | ///
|
8852 10065 | /// # Example
|
8853 10066 | ///
|
8854 10067 | /// ```no_run
|
8855 10068 | /// use rest_json::{RestJson, RestJsonConfig};
|
8856 10069 | ///
|
8857 10070 | /// use rest_json::{input, output, error};
|
8858 10071 | ///
|
8859 - | /// async fn handler(input: input::MalformedStringInput) -> output::MalformedStringOutput {
|
10072 + | /// async fn handler(input: input::MalformedTimestampBodyDefaultInput) -> Result<output::MalformedTimestampBodyDefaultOutput, error::MalformedTimestampBodyDefaultError> {
|
8860 10073 | /// todo!()
|
8861 10074 | /// }
|
8862 10075 | ///
|
8863 10076 | /// let config = RestJsonConfig::builder().build();
|
8864 10077 | /// let app = RestJson::builder(config)
|
8865 - | /// .malformed_string(handler)
|
10078 + | /// .malformed_timestamp_body_default(handler)
|
8866 10079 | /// /* Set other handlers */
|
8867 10080 | /// .build()
|
8868 10081 | /// .unwrap();
|
8869 10082 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8870 10083 | /// ```
|
8871 10084 | ///
|
8872 - | pub fn malformed_string<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10085 + | pub fn malformed_timestamp_body_default<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
8873 10086 | where
|
8874 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedString, HandlerExtractors>,
|
10087 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampBodyDefault, HandlerExtractors>,
|
8875 10088 |
|
8876 10089 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
8877 10090 | RestJson<L>,
|
8878 - | crate::operation_shape::MalformedString,
|
8879 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedString, HandlerType>
|
10091 + | crate::operation_shape::MalformedTimestampBodyDefault,
|
10092 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampBodyDefault, HandlerType>
|
8880 10093 | >,
|
8881 10094 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
8882 10095 | RestJson<L>,
|
8883 - | crate::operation_shape::MalformedString,
|
10096 + | crate::operation_shape::MalformedTimestampBodyDefault,
|
8884 10097 | ModelPl::Output
|
8885 10098 | >,
|
8886 10099 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
8887 10100 | RestJson<L>,
|
8888 - | crate::operation_shape::MalformedString,
|
10101 + | crate::operation_shape::MalformedTimestampBodyDefault,
|
8889 10102 | <
|
8890 10103 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8891 10104 | as ::aws_smithy_http_server::plugin::Plugin<
|
8892 10105 | RestJson<L>,
|
8893 - | crate::operation_shape::MalformedString,
|
10106 + | crate::operation_shape::MalformedTimestampBodyDefault,
|
8894 10107 | ModelPl::Output
|
8895 10108 | >
|
8896 10109 | >::Output
|
8897 10110 | >,
|
8898 10111 |
|
8899 10112 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8900 10113 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
8901 10114 |
|
8902 10115 | {
|
8903 10116 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
8904 10117 | use ::aws_smithy_http_server::plugin::Plugin;
|
8905 - | let svc = crate::operation_shape::MalformedString::from_handler(handler);
|
10118 + | let svc = crate::operation_shape::MalformedTimestampBodyDefault::from_handler(handler);
|
8906 10119 | let svc = self.model_plugin.apply(svc);
|
8907 10120 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8908 10121 | .apply(svc);
|
8909 10122 | let svc = self.http_plugin.apply(svc);
|
8910 - | self.malformed_string_custom(svc)
|
10123 + | self.malformed_timestamp_body_default_custom(svc)
|
8911 10124 | }
|
8912 10125 |
|
8913 - | /// Sets the [`MalformedString`](crate::operation_shape::MalformedString) operation.
|
10126 + | /// Sets the [`MalformedTimestampBodyDefault`](crate::operation_shape::MalformedTimestampBodyDefault) operation.
|
8914 10127 | ///
|
8915 10128 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
8916 10129 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
8917 10130 | ///
|
8918 10131 | /// # Example
|
8919 10132 | ///
|
8920 10133 | /// ```no_run
|
8921 10134 | /// use rest_json::{RestJson, RestJsonConfig};
|
8922 10135 | ///
|
8923 10136 | /// use rest_json::{input, output, error};
|
8924 10137 | ///
|
8925 - | /// async fn handler(input: input::MalformedStringInput) -> Result<output::MalformedStringOutput, std::convert::Infallible> {
|
10138 + | /// async fn handler(input: input::MalformedTimestampBodyDefaultInput) -> Result<output::MalformedTimestampBodyDefaultOutput, error::MalformedTimestampBodyDefaultError> {
|
8926 10139 | /// todo!()
|
8927 10140 | /// }
|
8928 10141 | ///
|
8929 10142 | /// let config = RestJsonConfig::builder().build();
|
8930 10143 | /// let svc = ::tower::util::service_fn(handler);
|
8931 10144 | /// let app = RestJson::builder(config)
|
8932 - | /// .malformed_string_service(svc)
|
10145 + | /// .malformed_timestamp_body_default_service(svc)
|
8933 10146 | /// /* Set other handlers */
|
8934 10147 | /// .build()
|
8935 10148 | /// .unwrap();
|
8936 10149 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
8937 10150 | /// ```
|
8938 10151 | ///
|
8939 - | pub fn malformed_string_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10152 + | pub fn malformed_timestamp_body_default_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
8940 10153 | where
|
8941 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedString, ServiceExtractors>,
|
10154 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampBodyDefault, ServiceExtractors>,
|
8942 10155 |
|
8943 10156 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
8944 10157 | RestJson<L>,
|
8945 - | crate::operation_shape::MalformedString,
|
8946 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedString, S>
|
10158 + | crate::operation_shape::MalformedTimestampBodyDefault,
|
10159 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampBodyDefault, S>
|
8947 10160 | >,
|
8948 10161 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
8949 10162 | RestJson<L>,
|
8950 - | crate::operation_shape::MalformedString,
|
10163 + | crate::operation_shape::MalformedTimestampBodyDefault,
|
8951 10164 | ModelPl::Output
|
8952 10165 | >,
|
8953 10166 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
8954 10167 | RestJson<L>,
|
8955 - | crate::operation_shape::MalformedString,
|
10168 + | crate::operation_shape::MalformedTimestampBodyDefault,
|
8956 10169 | <
|
8957 10170 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
8958 10171 | as ::aws_smithy_http_server::plugin::Plugin<
|
8959 10172 | RestJson<L>,
|
8960 - | crate::operation_shape::MalformedString,
|
10173 + | crate::operation_shape::MalformedTimestampBodyDefault,
|
8961 10174 | ModelPl::Output
|
8962 10175 | >
|
8963 10176 | >::Output
|
8964 10177 | >,
|
8965 10178 |
|
8966 10179 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
8967 10180 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
8968 10181 |
|
8969 10182 | {
|
8970 10183 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
8971 10184 | use ::aws_smithy_http_server::plugin::Plugin;
|
8972 - | let svc = crate::operation_shape::MalformedString::from_service(service);
|
10185 + | let svc = crate::operation_shape::MalformedTimestampBodyDefault::from_service(service);
|
8973 10186 | let svc = self.model_plugin.apply(svc);
|
8974 10187 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
8975 10188 | .apply(svc);
|
8976 10189 | let svc = self.http_plugin.apply(svc);
|
8977 - | self.malformed_string_custom(svc)
|
10190 + | self.malformed_timestamp_body_default_custom(svc)
|
8978 10191 | }
|
8979 10192 |
|
8980 - | /// Sets the [`MalformedString`](crate::operation_shape::MalformedString) to a custom [`Service`](tower::Service).
|
10193 + | /// Sets the [`MalformedTimestampBodyDefault`](crate::operation_shape::MalformedTimestampBodyDefault) to a custom [`Service`](tower::Service).
|
8981 10194 | /// not constrained by the Smithy contract.
|
8982 - | fn malformed_string_custom<S>(mut self, svc: S) -> Self
|
10195 + | fn malformed_timestamp_body_default_custom<S>(mut self, svc: S) -> Self
|
8983 10196 | where
|
8984 10197 | S: ::tower::Service<
|
8985 10198 | ::http_1x::Request<Body>,
|
8986 10199 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
8987 10200 | Error = ::std::convert::Infallible,
|
8988 10201 | > + Clone
|
8989 10202 | + Send
|
8990 10203 | + 'static,
|
8991 10204 | S::Future: Send + 'static,
|
8992 10205 | {
|
8993 - | self.malformed_string = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
10206 + | self.malformed_timestamp_body_default =
|
10207 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
8994 10208 | self
|
8995 10209 | }
|
8996 10210 |
|
8997 - | /// Sets the [`MalformedTimestampBodyDateTime`](crate::operation_shape::MalformedTimestampBodyDateTime) operation.
|
10211 + | /// Sets the [`MalformedTimestampBodyHttpDate`](crate::operation_shape::MalformedTimestampBodyHttpDate) operation.
|
8998 10212 | ///
|
8999 10213 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
9000 10214 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
9001 10215 | ///
|
9002 10216 | /// # Example
|
9003 10217 | ///
|
9004 10218 | /// ```no_run
|
9005 10219 | /// use rest_json::{RestJson, RestJsonConfig};
|
9006 10220 | ///
|
9007 10221 | /// use rest_json::{input, output, error};
|
9008 10222 | ///
|
9009 - | /// async fn handler(input: input::MalformedTimestampBodyDateTimeInput) -> Result<output::MalformedTimestampBodyDateTimeOutput, error::MalformedTimestampBodyDateTimeError> {
|
10223 + | /// async fn handler(input: input::MalformedTimestampBodyHttpDateInput) -> Result<output::MalformedTimestampBodyHttpDateOutput, error::MalformedTimestampBodyHttpDateError> {
|
9010 10224 | /// todo!()
|
9011 10225 | /// }
|
9012 10226 | ///
|
9013 10227 | /// let config = RestJsonConfig::builder().build();
|
9014 10228 | /// let app = RestJson::builder(config)
|
9015 - | /// .malformed_timestamp_body_date_time(handler)
|
10229 + | /// .malformed_timestamp_body_http_date(handler)
|
9016 10230 | /// /* Set other handlers */
|
9017 10231 | /// .build()
|
9018 10232 | /// .unwrap();
|
9019 10233 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9020 10234 | /// ```
|
9021 10235 | ///
|
9022 - | pub fn malformed_timestamp_body_date_time<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10236 + | pub fn malformed_timestamp_body_http_date<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9023 10237 | where
|
9024 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampBodyDateTime, HandlerExtractors>,
|
10238 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampBodyHttpDate, HandlerExtractors>,
|
9025 10239 |
|
9026 10240 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
9027 10241 | RestJson<L>,
|
9028 - | crate::operation_shape::MalformedTimestampBodyDateTime,
|
9029 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampBodyDateTime, HandlerType>
|
10242 + | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
10243 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampBodyHttpDate, HandlerType>
|
9030 10244 | >,
|
9031 10245 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
9032 10246 | RestJson<L>,
|
9033 - | crate::operation_shape::MalformedTimestampBodyDateTime,
|
10247 + | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
9034 10248 | ModelPl::Output
|
9035 10249 | >,
|
9036 10250 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
9037 10251 | RestJson<L>,
|
9038 - | crate::operation_shape::MalformedTimestampBodyDateTime,
|
10252 + | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
9039 10253 | <
|
9040 10254 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9041 10255 | as ::aws_smithy_http_server::plugin::Plugin<
|
9042 10256 | RestJson<L>,
|
9043 - | crate::operation_shape::MalformedTimestampBodyDateTime,
|
10257 + | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
9044 10258 | ModelPl::Output
|
9045 10259 | >
|
9046 10260 | >::Output
|
9047 10261 | >,
|
9048 10262 |
|
9049 10263 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9050 10264 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
9051 10265 |
|
9052 10266 | {
|
9053 10267 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
9054 10268 | use ::aws_smithy_http_server::plugin::Plugin;
|
9055 - | let svc = crate::operation_shape::MalformedTimestampBodyDateTime::from_handler(handler);
|
10269 + | let svc = crate::operation_shape::MalformedTimestampBodyHttpDate::from_handler(handler);
|
9056 10270 | let svc = self.model_plugin.apply(svc);
|
9057 10271 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9058 10272 | .apply(svc);
|
9059 10273 | let svc = self.http_plugin.apply(svc);
|
9060 - | self.malformed_timestamp_body_date_time_custom(svc)
|
10274 + | self.malformed_timestamp_body_http_date_custom(svc)
|
9061 10275 | }
|
9062 10276 |
|
9063 - | /// Sets the [`MalformedTimestampBodyDateTime`](crate::operation_shape::MalformedTimestampBodyDateTime) operation.
|
10277 + | /// Sets the [`MalformedTimestampBodyHttpDate`](crate::operation_shape::MalformedTimestampBodyHttpDate) operation.
|
9064 10278 | ///
|
9065 10279 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
9066 10280 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
9067 10281 | ///
|
9068 10282 | /// # Example
|
9069 10283 | ///
|
9070 10284 | /// ```no_run
|
9071 10285 | /// use rest_json::{RestJson, RestJsonConfig};
|
9072 10286 | ///
|
9073 10287 | /// use rest_json::{input, output, error};
|
9074 10288 | ///
|
9075 - | /// async fn handler(input: input::MalformedTimestampBodyDateTimeInput) -> Result<output::MalformedTimestampBodyDateTimeOutput, error::MalformedTimestampBodyDateTimeError> {
|
10289 + | /// async fn handler(input: input::MalformedTimestampBodyHttpDateInput) -> Result<output::MalformedTimestampBodyHttpDateOutput, error::MalformedTimestampBodyHttpDateError> {
|
9076 10290 | /// todo!()
|
9077 10291 | /// }
|
9078 10292 | ///
|
9079 10293 | /// let config = RestJsonConfig::builder().build();
|
9080 10294 | /// let svc = ::tower::util::service_fn(handler);
|
9081 10295 | /// let app = RestJson::builder(config)
|
9082 - | /// .malformed_timestamp_body_date_time_service(svc)
|
10296 + | /// .malformed_timestamp_body_http_date_service(svc)
|
9083 10297 | /// /* Set other handlers */
|
9084 10298 | /// .build()
|
9085 10299 | /// .unwrap();
|
9086 10300 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9087 10301 | /// ```
|
9088 10302 | ///
|
9089 - | pub fn malformed_timestamp_body_date_time_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10303 + | pub fn malformed_timestamp_body_http_date_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9090 10304 | where
|
9091 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampBodyDateTime, ServiceExtractors>,
|
10305 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampBodyHttpDate, ServiceExtractors>,
|
9092 10306 |
|
9093 10307 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
9094 10308 | RestJson<L>,
|
9095 - | crate::operation_shape::MalformedTimestampBodyDateTime,
|
9096 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampBodyDateTime, S>
|
10309 + | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
10310 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampBodyHttpDate, S>
|
9097 10311 | >,
|
9098 10312 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
9099 10313 | RestJson<L>,
|
9100 - | crate::operation_shape::MalformedTimestampBodyDateTime,
|
10314 + | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
9101 10315 | ModelPl::Output
|
9102 10316 | >,
|
9103 10317 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
9104 10318 | RestJson<L>,
|
9105 - | crate::operation_shape::MalformedTimestampBodyDateTime,
|
10319 + | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
9106 10320 | <
|
9107 10321 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9108 10322 | as ::aws_smithy_http_server::plugin::Plugin<
|
9109 10323 | RestJson<L>,
|
9110 - | crate::operation_shape::MalformedTimestampBodyDateTime,
|
10324 + | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
9111 10325 | ModelPl::Output
|
9112 10326 | >
|
9113 10327 | >::Output
|
9114 10328 | >,
|
9115 10329 |
|
9116 10330 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9117 10331 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
9118 10332 |
|
9119 10333 | {
|
9120 10334 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
9121 10335 | use ::aws_smithy_http_server::plugin::Plugin;
|
9122 - | let svc = crate::operation_shape::MalformedTimestampBodyDateTime::from_service(service);
|
10336 + | let svc = crate::operation_shape::MalformedTimestampBodyHttpDate::from_service(service);
|
9123 10337 | let svc = self.model_plugin.apply(svc);
|
9124 10338 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9125 10339 | .apply(svc);
|
9126 10340 | let svc = self.http_plugin.apply(svc);
|
9127 - | self.malformed_timestamp_body_date_time_custom(svc)
|
10341 + | self.malformed_timestamp_body_http_date_custom(svc)
|
9128 10342 | }
|
9129 10343 |
|
9130 - | /// Sets the [`MalformedTimestampBodyDateTime`](crate::operation_shape::MalformedTimestampBodyDateTime) to a custom [`Service`](tower::Service).
|
10344 + | /// Sets the [`MalformedTimestampBodyHttpDate`](crate::operation_shape::MalformedTimestampBodyHttpDate) to a custom [`Service`](tower::Service).
|
9131 10345 | /// not constrained by the Smithy contract.
|
9132 - | fn malformed_timestamp_body_date_time_custom<S>(mut self, svc: S) -> Self
|
10346 + | fn malformed_timestamp_body_http_date_custom<S>(mut self, svc: S) -> Self
|
9133 10347 | where
|
9134 10348 | S: ::tower::Service<
|
9135 10349 | ::http_1x::Request<Body>,
|
9136 10350 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
9137 10351 | Error = ::std::convert::Infallible,
|
9138 10352 | > + Clone
|
9139 10353 | + Send
|
9140 10354 | + 'static,
|
9141 10355 | S::Future: Send + 'static,
|
9142 10356 | {
|
9143 - | self.malformed_timestamp_body_date_time =
|
10357 + | self.malformed_timestamp_body_http_date =
|
9144 10358 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
9145 10359 | self
|
9146 10360 | }
|
9147 10361 |
|
9148 - | /// Sets the [`MalformedTimestampBodyDefault`](crate::operation_shape::MalformedTimestampBodyDefault) operation.
|
10362 + | /// Sets the [`MalformedTimestampHeaderDateTime`](crate::operation_shape::MalformedTimestampHeaderDateTime) operation.
|
9149 10363 | ///
|
9150 10364 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
9151 10365 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
9152 10366 | ///
|
9153 10367 | /// # Example
|
9154 10368 | ///
|
9155 10369 | /// ```no_run
|
9156 10370 | /// use rest_json::{RestJson, RestJsonConfig};
|
9157 10371 | ///
|
9158 10372 | /// use rest_json::{input, output, error};
|
9159 10373 | ///
|
9160 - | /// async fn handler(input: input::MalformedTimestampBodyDefaultInput) -> Result<output::MalformedTimestampBodyDefaultOutput, error::MalformedTimestampBodyDefaultError> {
|
10374 + | /// async fn handler(input: input::MalformedTimestampHeaderDateTimeInput) -> Result<output::MalformedTimestampHeaderDateTimeOutput, error::MalformedTimestampHeaderDateTimeError> {
|
9161 10375 | /// todo!()
|
9162 10376 | /// }
|
9163 10377 | ///
|
9164 10378 | /// let config = RestJsonConfig::builder().build();
|
9165 10379 | /// let app = RestJson::builder(config)
|
9166 - | /// .malformed_timestamp_body_default(handler)
|
10380 + | /// .malformed_timestamp_header_date_time(handler)
|
9167 10381 | /// /* Set other handlers */
|
9168 10382 | /// .build()
|
9169 10383 | /// .unwrap();
|
9170 10384 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9171 10385 | /// ```
|
9172 10386 | ///
|
9173 - | pub fn malformed_timestamp_body_default<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10387 + | pub fn malformed_timestamp_header_date_time<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9174 10388 | where
|
9175 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampBodyDefault, HandlerExtractors>,
|
10389 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampHeaderDateTime, HandlerExtractors>,
|
9176 10390 |
|
9177 10391 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
9178 10392 | RestJson<L>,
|
9179 - | crate::operation_shape::MalformedTimestampBodyDefault,
|
9180 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampBodyDefault, HandlerType>
|
10393 + | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
10394 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampHeaderDateTime, HandlerType>
|
9181 10395 | >,
|
9182 10396 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
9183 10397 | RestJson<L>,
|
9184 - | crate::operation_shape::MalformedTimestampBodyDefault,
|
10398 + | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
9185 10399 | ModelPl::Output
|
9186 10400 | >,
|
9187 10401 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
9188 10402 | RestJson<L>,
|
9189 - | crate::operation_shape::MalformedTimestampBodyDefault,
|
10403 + | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
9190 10404 | <
|
9191 10405 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9192 10406 | as ::aws_smithy_http_server::plugin::Plugin<
|
9193 10407 | RestJson<L>,
|
9194 - | crate::operation_shape::MalformedTimestampBodyDefault,
|
10408 + | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
9195 10409 | ModelPl::Output
|
9196 10410 | >
|
9197 10411 | >::Output
|
9198 10412 | >,
|
9199 10413 |
|
9200 10414 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9201 10415 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
9202 10416 |
|
9203 10417 | {
|
9204 10418 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
9205 10419 | use ::aws_smithy_http_server::plugin::Plugin;
|
9206 - | let svc = crate::operation_shape::MalformedTimestampBodyDefault::from_handler(handler);
|
10420 + | let svc = crate::operation_shape::MalformedTimestampHeaderDateTime::from_handler(handler);
|
9207 10421 | let svc = self.model_plugin.apply(svc);
|
9208 10422 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9209 10423 | .apply(svc);
|
9210 10424 | let svc = self.http_plugin.apply(svc);
|
9211 - | self.malformed_timestamp_body_default_custom(svc)
|
10425 + | self.malformed_timestamp_header_date_time_custom(svc)
|
9212 10426 | }
|
9213 10427 |
|
9214 - | /// Sets the [`MalformedTimestampBodyDefault`](crate::operation_shape::MalformedTimestampBodyDefault) operation.
|
10428 + | /// Sets the [`MalformedTimestampHeaderDateTime`](crate::operation_shape::MalformedTimestampHeaderDateTime) operation.
|
9215 10429 | ///
|
9216 10430 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
9217 10431 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
9218 10432 | ///
|
9219 10433 | /// # Example
|
9220 10434 | ///
|
9221 10435 | /// ```no_run
|
9222 10436 | /// use rest_json::{RestJson, RestJsonConfig};
|
9223 10437 | ///
|
9224 10438 | /// use rest_json::{input, output, error};
|
9225 10439 | ///
|
9226 - | /// async fn handler(input: input::MalformedTimestampBodyDefaultInput) -> Result<output::MalformedTimestampBodyDefaultOutput, error::MalformedTimestampBodyDefaultError> {
|
10440 + | /// async fn handler(input: input::MalformedTimestampHeaderDateTimeInput) -> Result<output::MalformedTimestampHeaderDateTimeOutput, error::MalformedTimestampHeaderDateTimeError> {
|
9227 10441 | /// todo!()
|
9228 10442 | /// }
|
9229 10443 | ///
|
9230 10444 | /// let config = RestJsonConfig::builder().build();
|
9231 10445 | /// let svc = ::tower::util::service_fn(handler);
|
9232 10446 | /// let app = RestJson::builder(config)
|
9233 - | /// .malformed_timestamp_body_default_service(svc)
|
10447 + | /// .malformed_timestamp_header_date_time_service(svc)
|
9234 10448 | /// /* Set other handlers */
|
9235 10449 | /// .build()
|
9236 10450 | /// .unwrap();
|
9237 10451 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9238 10452 | /// ```
|
9239 10453 | ///
|
9240 - | pub fn malformed_timestamp_body_default_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10454 + | pub fn malformed_timestamp_header_date_time_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9241 10455 | where
|
9242 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampBodyDefault, ServiceExtractors>,
|
10456 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampHeaderDateTime, ServiceExtractors>,
|
9243 10457 |
|
9244 10458 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
9245 10459 | RestJson<L>,
|
9246 - | crate::operation_shape::MalformedTimestampBodyDefault,
|
9247 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampBodyDefault, S>
|
10460 + | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
10461 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampHeaderDateTime, S>
|
9248 10462 | >,
|
9249 10463 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
9250 10464 | RestJson<L>,
|
9251 - | crate::operation_shape::MalformedTimestampBodyDefault,
|
10465 + | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
9252 10466 | ModelPl::Output
|
9253 10467 | >,
|
9254 10468 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
9255 10469 | RestJson<L>,
|
9256 - | crate::operation_shape::MalformedTimestampBodyDefault,
|
10470 + | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
9257 10471 | <
|
9258 10472 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9259 10473 | as ::aws_smithy_http_server::plugin::Plugin<
|
9260 10474 | RestJson<L>,
|
9261 - | crate::operation_shape::MalformedTimestampBodyDefault,
|
10475 + | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
9262 10476 | ModelPl::Output
|
9263 10477 | >
|
9264 10478 | >::Output
|
9265 10479 | >,
|
9266 10480 |
|
9267 10481 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9268 10482 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
9269 10483 |
|
9270 10484 | {
|
9271 10485 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
9272 10486 | use ::aws_smithy_http_server::plugin::Plugin;
|
9273 - | let svc = crate::operation_shape::MalformedTimestampBodyDefault::from_service(service);
|
10487 + | let svc = crate::operation_shape::MalformedTimestampHeaderDateTime::from_service(service);
|
9274 10488 | let svc = self.model_plugin.apply(svc);
|
9275 10489 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9276 10490 | .apply(svc);
|
9277 10491 | let svc = self.http_plugin.apply(svc);
|
9278 - | self.malformed_timestamp_body_default_custom(svc)
|
10492 + | self.malformed_timestamp_header_date_time_custom(svc)
|
9279 10493 | }
|
9280 10494 |
|
9281 - | /// Sets the [`MalformedTimestampBodyDefault`](crate::operation_shape::MalformedTimestampBodyDefault) to a custom [`Service`](tower::Service).
|
10495 + | /// Sets the [`MalformedTimestampHeaderDateTime`](crate::operation_shape::MalformedTimestampHeaderDateTime) to a custom [`Service`](tower::Service).
|
9282 10496 | /// not constrained by the Smithy contract.
|
9283 - | fn malformed_timestamp_body_default_custom<S>(mut self, svc: S) -> Self
|
10497 + | fn malformed_timestamp_header_date_time_custom<S>(mut self, svc: S) -> Self
|
9284 10498 | where
|
9285 10499 | S: ::tower::Service<
|
9286 10500 | ::http_1x::Request<Body>,
|
9287 10501 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
9288 10502 | Error = ::std::convert::Infallible,
|
9289 10503 | > + Clone
|
9290 10504 | + Send
|
9291 10505 | + 'static,
|
9292 10506 | S::Future: Send + 'static,
|
9293 10507 | {
|
9294 - | self.malformed_timestamp_body_default =
|
10508 + | self.malformed_timestamp_header_date_time =
|
9295 10509 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
9296 10510 | self
|
9297 10511 | }
|
9298 10512 |
|
9299 - | /// Sets the [`MalformedTimestampBodyHttpDate`](crate::operation_shape::MalformedTimestampBodyHttpDate) operation.
|
10513 + | /// Sets the [`MalformedTimestampHeaderDefault`](crate::operation_shape::MalformedTimestampHeaderDefault) operation.
|
9300 10514 | ///
|
9301 10515 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
9302 10516 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
9303 10517 | ///
|
9304 10518 | /// # Example
|
9305 10519 | ///
|
9306 10520 | /// ```no_run
|
9307 10521 | /// use rest_json::{RestJson, RestJsonConfig};
|
9308 10522 | ///
|
9309 10523 | /// use rest_json::{input, output, error};
|
9310 10524 | ///
|
9311 - | /// async fn handler(input: input::MalformedTimestampBodyHttpDateInput) -> Result<output::MalformedTimestampBodyHttpDateOutput, error::MalformedTimestampBodyHttpDateError> {
|
10525 + | /// async fn handler(input: input::MalformedTimestampHeaderDefaultInput) -> Result<output::MalformedTimestampHeaderDefaultOutput, error::MalformedTimestampHeaderDefaultError> {
|
9312 10526 | /// todo!()
|
9313 10527 | /// }
|
9314 10528 | ///
|
9315 10529 | /// let config = RestJsonConfig::builder().build();
|
9316 10530 | /// let app = RestJson::builder(config)
|
9317 - | /// .malformed_timestamp_body_http_date(handler)
|
10531 + | /// .malformed_timestamp_header_default(handler)
|
9318 10532 | /// /* Set other handlers */
|
9319 10533 | /// .build()
|
9320 10534 | /// .unwrap();
|
9321 10535 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9322 10536 | /// ```
|
9323 10537 | ///
|
9324 - | pub fn malformed_timestamp_body_http_date<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10538 + | pub fn malformed_timestamp_header_default<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9325 10539 | where
|
9326 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampBodyHttpDate, HandlerExtractors>,
|
10540 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampHeaderDefault, HandlerExtractors>,
|
9327 10541 |
|
9328 10542 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
9329 10543 | RestJson<L>,
|
9330 - | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
9331 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampBodyHttpDate, HandlerType>
|
10544 + | crate::operation_shape::MalformedTimestampHeaderDefault,
|
10545 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampHeaderDefault, HandlerType>
|
9332 10546 | >,
|
9333 10547 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
9334 10548 | RestJson<L>,
|
9335 - | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
10549 + | crate::operation_shape::MalformedTimestampHeaderDefault,
|
9336 10550 | ModelPl::Output
|
9337 10551 | >,
|
9338 10552 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
9339 10553 | RestJson<L>,
|
9340 - | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
10554 + | crate::operation_shape::MalformedTimestampHeaderDefault,
|
9341 10555 | <
|
9342 10556 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9343 10557 | as ::aws_smithy_http_server::plugin::Plugin<
|
9344 10558 | RestJson<L>,
|
9345 - | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
10559 + | crate::operation_shape::MalformedTimestampHeaderDefault,
|
9346 10560 | ModelPl::Output
|
9347 10561 | >
|
9348 10562 | >::Output
|
9349 10563 | >,
|
9350 10564 |
|
9351 10565 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9352 10566 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
9353 10567 |
|
9354 10568 | {
|
9355 10569 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
9356 10570 | use ::aws_smithy_http_server::plugin::Plugin;
|
9357 - | let svc = crate::operation_shape::MalformedTimestampBodyHttpDate::from_handler(handler);
|
10571 + | let svc = crate::operation_shape::MalformedTimestampHeaderDefault::from_handler(handler);
|
9358 10572 | let svc = self.model_plugin.apply(svc);
|
9359 10573 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9360 10574 | .apply(svc);
|
9361 10575 | let svc = self.http_plugin.apply(svc);
|
9362 - | self.malformed_timestamp_body_http_date_custom(svc)
|
10576 + | self.malformed_timestamp_header_default_custom(svc)
|
9363 10577 | }
|
9364 10578 |
|
9365 - | /// Sets the [`MalformedTimestampBodyHttpDate`](crate::operation_shape::MalformedTimestampBodyHttpDate) operation.
|
10579 + | /// Sets the [`MalformedTimestampHeaderDefault`](crate::operation_shape::MalformedTimestampHeaderDefault) operation.
|
9366 10580 | ///
|
9367 10581 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
9368 10582 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
9369 10583 | ///
|
9370 10584 | /// # Example
|
9371 10585 | ///
|
9372 10586 | /// ```no_run
|
9373 10587 | /// use rest_json::{RestJson, RestJsonConfig};
|
9374 10588 | ///
|
9375 10589 | /// use rest_json::{input, output, error};
|
9376 10590 | ///
|
9377 - | /// async fn handler(input: input::MalformedTimestampBodyHttpDateInput) -> Result<output::MalformedTimestampBodyHttpDateOutput, error::MalformedTimestampBodyHttpDateError> {
|
10591 + | /// async fn handler(input: input::MalformedTimestampHeaderDefaultInput) -> Result<output::MalformedTimestampHeaderDefaultOutput, error::MalformedTimestampHeaderDefaultError> {
|
9378 10592 | /// todo!()
|
9379 10593 | /// }
|
9380 10594 | ///
|
9381 10595 | /// let config = RestJsonConfig::builder().build();
|
9382 10596 | /// let svc = ::tower::util::service_fn(handler);
|
9383 10597 | /// let app = RestJson::builder(config)
|
9384 - | /// .malformed_timestamp_body_http_date_service(svc)
|
10598 + | /// .malformed_timestamp_header_default_service(svc)
|
9385 10599 | /// /* Set other handlers */
|
9386 10600 | /// .build()
|
9387 10601 | /// .unwrap();
|
9388 10602 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9389 10603 | /// ```
|
9390 10604 | ///
|
9391 - | pub fn malformed_timestamp_body_http_date_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10605 + | pub fn malformed_timestamp_header_default_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9392 10606 | where
|
9393 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampBodyHttpDate, ServiceExtractors>,
|
10607 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampHeaderDefault, ServiceExtractors>,
|
9394 10608 |
|
9395 10609 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
9396 10610 | RestJson<L>,
|
9397 - | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
9398 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampBodyHttpDate, S>
|
10611 + | crate::operation_shape::MalformedTimestampHeaderDefault,
|
10612 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampHeaderDefault, S>
|
9399 10613 | >,
|
9400 10614 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
9401 10615 | RestJson<L>,
|
9402 - | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
10616 + | crate::operation_shape::MalformedTimestampHeaderDefault,
|
9403 10617 | ModelPl::Output
|
9404 10618 | >,
|
9405 10619 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
9406 10620 | RestJson<L>,
|
9407 - | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
10621 + | crate::operation_shape::MalformedTimestampHeaderDefault,
|
9408 10622 | <
|
9409 10623 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9410 10624 | as ::aws_smithy_http_server::plugin::Plugin<
|
9411 10625 | RestJson<L>,
|
9412 - | crate::operation_shape::MalformedTimestampBodyHttpDate,
|
10626 + | crate::operation_shape::MalformedTimestampHeaderDefault,
|
9413 10627 | ModelPl::Output
|
9414 10628 | >
|
9415 10629 | >::Output
|
9416 10630 | >,
|
9417 10631 |
|
9418 10632 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9419 10633 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
9420 10634 |
|
9421 10635 | {
|
9422 10636 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
9423 10637 | use ::aws_smithy_http_server::plugin::Plugin;
|
9424 - | let svc = crate::operation_shape::MalformedTimestampBodyHttpDate::from_service(service);
|
10638 + | let svc = crate::operation_shape::MalformedTimestampHeaderDefault::from_service(service);
|
9425 10639 | let svc = self.model_plugin.apply(svc);
|
9426 10640 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9427 10641 | .apply(svc);
|
9428 10642 | let svc = self.http_plugin.apply(svc);
|
9429 - | self.malformed_timestamp_body_http_date_custom(svc)
|
10643 + | self.malformed_timestamp_header_default_custom(svc)
|
9430 10644 | }
|
9431 10645 |
|
9432 - | /// Sets the [`MalformedTimestampBodyHttpDate`](crate::operation_shape::MalformedTimestampBodyHttpDate) to a custom [`Service`](tower::Service).
|
10646 + | /// Sets the [`MalformedTimestampHeaderDefault`](crate::operation_shape::MalformedTimestampHeaderDefault) to a custom [`Service`](tower::Service).
|
9433 10647 | /// not constrained by the Smithy contract.
|
9434 - | fn malformed_timestamp_body_http_date_custom<S>(mut self, svc: S) -> Self
|
10648 + | fn malformed_timestamp_header_default_custom<S>(mut self, svc: S) -> Self
|
9435 10649 | where
|
9436 10650 | S: ::tower::Service<
|
9437 10651 | ::http_1x::Request<Body>,
|
9438 10652 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
9439 10653 | Error = ::std::convert::Infallible,
|
9440 10654 | > + Clone
|
9441 10655 | + Send
|
9442 10656 | + 'static,
|
9443 10657 | S::Future: Send + 'static,
|
9444 10658 | {
|
9445 - | self.malformed_timestamp_body_http_date =
|
10659 + | self.malformed_timestamp_header_default =
|
9446 10660 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
9447 10661 | self
|
9448 10662 | }
|
9449 10663 |
|
9450 - | /// Sets the [`MalformedTimestampHeaderDateTime`](crate::operation_shape::MalformedTimestampHeaderDateTime) operation.
|
10664 + | /// Sets the [`MalformedTimestampHeaderEpoch`](crate::operation_shape::MalformedTimestampHeaderEpoch) operation.
|
9451 10665 | ///
|
9452 10666 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
9453 10667 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
9454 10668 | ///
|
9455 10669 | /// # Example
|
9456 10670 | ///
|
9457 10671 | /// ```no_run
|
9458 10672 | /// use rest_json::{RestJson, RestJsonConfig};
|
9459 10673 | ///
|
9460 10674 | /// use rest_json::{input, output, error};
|
9461 10675 | ///
|
9462 - | /// async fn handler(input: input::MalformedTimestampHeaderDateTimeInput) -> Result<output::MalformedTimestampHeaderDateTimeOutput, error::MalformedTimestampHeaderDateTimeError> {
|
10676 + | /// async fn handler(input: input::MalformedTimestampHeaderEpochInput) -> Result<output::MalformedTimestampHeaderEpochOutput, error::MalformedTimestampHeaderEpochError> {
|
9463 10677 | /// todo!()
|
9464 10678 | /// }
|
9465 10679 | ///
|
9466 10680 | /// let config = RestJsonConfig::builder().build();
|
9467 10681 | /// let app = RestJson::builder(config)
|
9468 - | /// .malformed_timestamp_header_date_time(handler)
|
10682 + | /// .malformed_timestamp_header_epoch(handler)
|
9469 10683 | /// /* Set other handlers */
|
9470 10684 | /// .build()
|
9471 10685 | /// .unwrap();
|
9472 10686 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9473 10687 | /// ```
|
9474 10688 | ///
|
9475 - | pub fn malformed_timestamp_header_date_time<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10689 + | pub fn malformed_timestamp_header_epoch<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9476 10690 | where
|
9477 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampHeaderDateTime, HandlerExtractors>,
|
10691 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampHeaderEpoch, HandlerExtractors>,
|
9478 10692 |
|
9479 10693 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
9480 10694 | RestJson<L>,
|
9481 - | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
9482 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampHeaderDateTime, HandlerType>
|
10695 + | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
10696 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampHeaderEpoch, HandlerType>
|
9483 10697 | >,
|
9484 10698 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
9485 10699 | RestJson<L>,
|
9486 - | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
10700 + | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
9487 10701 | ModelPl::Output
|
9488 10702 | >,
|
9489 10703 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
9490 10704 | RestJson<L>,
|
9491 - | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
10705 + | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
9492 10706 | <
|
9493 10707 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9494 10708 | as ::aws_smithy_http_server::plugin::Plugin<
|
9495 10709 | RestJson<L>,
|
9496 - | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
10710 + | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
9497 10711 | ModelPl::Output
|
9498 10712 | >
|
9499 10713 | >::Output
|
9500 10714 | >,
|
9501 10715 |
|
9502 10716 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9503 10717 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
9504 10718 |
|
9505 10719 | {
|
9506 10720 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
9507 10721 | use ::aws_smithy_http_server::plugin::Plugin;
|
9508 - | let svc = crate::operation_shape::MalformedTimestampHeaderDateTime::from_handler(handler);
|
10722 + | let svc = crate::operation_shape::MalformedTimestampHeaderEpoch::from_handler(handler);
|
9509 10723 | let svc = self.model_plugin.apply(svc);
|
9510 10724 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9511 10725 | .apply(svc);
|
9512 10726 | let svc = self.http_plugin.apply(svc);
|
9513 - | self.malformed_timestamp_header_date_time_custom(svc)
|
10727 + | self.malformed_timestamp_header_epoch_custom(svc)
|
9514 10728 | }
|
9515 10729 |
|
9516 - | /// Sets the [`MalformedTimestampHeaderDateTime`](crate::operation_shape::MalformedTimestampHeaderDateTime) operation.
|
10730 + | /// Sets the [`MalformedTimestampHeaderEpoch`](crate::operation_shape::MalformedTimestampHeaderEpoch) operation.
|
9517 10731 | ///
|
9518 10732 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
9519 10733 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
9520 10734 | ///
|
9521 10735 | /// # Example
|
9522 10736 | ///
|
9523 10737 | /// ```no_run
|
9524 10738 | /// use rest_json::{RestJson, RestJsonConfig};
|
9525 10739 | ///
|
9526 10740 | /// use rest_json::{input, output, error};
|
9527 10741 | ///
|
9528 - | /// async fn handler(input: input::MalformedTimestampHeaderDateTimeInput) -> Result<output::MalformedTimestampHeaderDateTimeOutput, error::MalformedTimestampHeaderDateTimeError> {
|
10742 + | /// async fn handler(input: input::MalformedTimestampHeaderEpochInput) -> Result<output::MalformedTimestampHeaderEpochOutput, error::MalformedTimestampHeaderEpochError> {
|
9529 10743 | /// todo!()
|
9530 10744 | /// }
|
9531 10745 | ///
|
9532 10746 | /// let config = RestJsonConfig::builder().build();
|
9533 10747 | /// let svc = ::tower::util::service_fn(handler);
|
9534 10748 | /// let app = RestJson::builder(config)
|
9535 - | /// .malformed_timestamp_header_date_time_service(svc)
|
10749 + | /// .malformed_timestamp_header_epoch_service(svc)
|
9536 10750 | /// /* Set other handlers */
|
9537 10751 | /// .build()
|
9538 10752 | /// .unwrap();
|
9539 10753 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9540 10754 | /// ```
|
9541 10755 | ///
|
9542 - | pub fn malformed_timestamp_header_date_time_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10756 + | pub fn malformed_timestamp_header_epoch_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9543 10757 | where
|
9544 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampHeaderDateTime, ServiceExtractors>,
|
10758 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampHeaderEpoch, ServiceExtractors>,
|
9545 10759 |
|
9546 10760 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
9547 10761 | RestJson<L>,
|
9548 - | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
9549 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampHeaderDateTime, S>
|
10762 + | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
10763 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampHeaderEpoch, S>
|
9550 10764 | >,
|
9551 10765 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
9552 10766 | RestJson<L>,
|
9553 - | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
10767 + | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
9554 10768 | ModelPl::Output
|
9555 10769 | >,
|
9556 10770 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
9557 10771 | RestJson<L>,
|
9558 - | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
10772 + | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
9559 10773 | <
|
9560 10774 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9561 10775 | as ::aws_smithy_http_server::plugin::Plugin<
|
9562 10776 | RestJson<L>,
|
9563 - | crate::operation_shape::MalformedTimestampHeaderDateTime,
|
10777 + | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
9564 10778 | ModelPl::Output
|
9565 10779 | >
|
9566 10780 | >::Output
|
9567 10781 | >,
|
9568 10782 |
|
9569 10783 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9570 10784 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
9571 10785 |
|
9572 10786 | {
|
9573 10787 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
9574 10788 | use ::aws_smithy_http_server::plugin::Plugin;
|
9575 - | let svc = crate::operation_shape::MalformedTimestampHeaderDateTime::from_service(service);
|
10789 + | let svc = crate::operation_shape::MalformedTimestampHeaderEpoch::from_service(service);
|
9576 10790 | let svc = self.model_plugin.apply(svc);
|
9577 10791 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9578 10792 | .apply(svc);
|
9579 10793 | let svc = self.http_plugin.apply(svc);
|
9580 - | self.malformed_timestamp_header_date_time_custom(svc)
|
10794 + | self.malformed_timestamp_header_epoch_custom(svc)
|
9581 10795 | }
|
9582 10796 |
|
9583 - | /// Sets the [`MalformedTimestampHeaderDateTime`](crate::operation_shape::MalformedTimestampHeaderDateTime) to a custom [`Service`](tower::Service).
|
10797 + | /// Sets the [`MalformedTimestampHeaderEpoch`](crate::operation_shape::MalformedTimestampHeaderEpoch) to a custom [`Service`](tower::Service).
|
9584 10798 | /// not constrained by the Smithy contract.
|
9585 - | fn malformed_timestamp_header_date_time_custom<S>(mut self, svc: S) -> Self
|
10799 + | fn malformed_timestamp_header_epoch_custom<S>(mut self, svc: S) -> Self
|
9586 10800 | where
|
9587 10801 | S: ::tower::Service<
|
9588 10802 | ::http_1x::Request<Body>,
|
9589 10803 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
9590 10804 | Error = ::std::convert::Infallible,
|
9591 10805 | > + Clone
|
9592 10806 | + Send
|
9593 10807 | + 'static,
|
9594 10808 | S::Future: Send + 'static,
|
9595 10809 | {
|
9596 - | self.malformed_timestamp_header_date_time =
|
10810 + | self.malformed_timestamp_header_epoch =
|
9597 10811 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
9598 10812 | self
|
9599 10813 | }
|
9600 10814 |
|
9601 - | /// Sets the [`MalformedTimestampHeaderDefault`](crate::operation_shape::MalformedTimestampHeaderDefault) operation.
|
10815 + | /// Sets the [`MalformedTimestampPathDefault`](crate::operation_shape::MalformedTimestampPathDefault) operation.
|
9602 10816 | ///
|
9603 10817 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
9604 10818 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
9605 10819 | ///
|
9606 10820 | /// # Example
|
9607 10821 | ///
|
9608 10822 | /// ```no_run
|
9609 10823 | /// use rest_json::{RestJson, RestJsonConfig};
|
9610 10824 | ///
|
9611 10825 | /// use rest_json::{input, output, error};
|
9612 10826 | ///
|
9613 - | /// async fn handler(input: input::MalformedTimestampHeaderDefaultInput) -> Result<output::MalformedTimestampHeaderDefaultOutput, error::MalformedTimestampHeaderDefaultError> {
|
10827 + | /// async fn handler(input: input::MalformedTimestampPathDefaultInput) -> Result<output::MalformedTimestampPathDefaultOutput, error::MalformedTimestampPathDefaultError> {
|
9614 10828 | /// todo!()
|
9615 10829 | /// }
|
9616 10830 | ///
|
9617 10831 | /// let config = RestJsonConfig::builder().build();
|
9618 10832 | /// let app = RestJson::builder(config)
|
9619 - | /// .malformed_timestamp_header_default(handler)
|
10833 + | /// .malformed_timestamp_path_default(handler)
|
9620 10834 | /// /* Set other handlers */
|
9621 10835 | /// .build()
|
9622 10836 | /// .unwrap();
|
9623 10837 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9624 10838 | /// ```
|
9625 10839 | ///
|
9626 - | pub fn malformed_timestamp_header_default<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10840 + | pub fn malformed_timestamp_path_default<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9627 10841 | where
|
9628 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampHeaderDefault, HandlerExtractors>,
|
10842 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampPathDefault, HandlerExtractors>,
|
9629 10843 |
|
9630 10844 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
9631 10845 | RestJson<L>,
|
9632 - | crate::operation_shape::MalformedTimestampHeaderDefault,
|
9633 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampHeaderDefault, HandlerType>
|
10846 + | crate::operation_shape::MalformedTimestampPathDefault,
|
10847 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampPathDefault, HandlerType>
|
9634 10848 | >,
|
9635 10849 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
9636 10850 | RestJson<L>,
|
9637 - | crate::operation_shape::MalformedTimestampHeaderDefault,
|
10851 + | crate::operation_shape::MalformedTimestampPathDefault,
|
9638 10852 | ModelPl::Output
|
9639 10853 | >,
|
9640 10854 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
9641 10855 | RestJson<L>,
|
9642 - | crate::operation_shape::MalformedTimestampHeaderDefault,
|
10856 + | crate::operation_shape::MalformedTimestampPathDefault,
|
9643 10857 | <
|
9644 10858 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9645 10859 | as ::aws_smithy_http_server::plugin::Plugin<
|
9646 10860 | RestJson<L>,
|
9647 - | crate::operation_shape::MalformedTimestampHeaderDefault,
|
10861 + | crate::operation_shape::MalformedTimestampPathDefault,
|
9648 10862 | ModelPl::Output
|
9649 10863 | >
|
9650 10864 | >::Output
|
9651 10865 | >,
|
9652 10866 |
|
9653 10867 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9654 10868 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
9655 10869 |
|
9656 10870 | {
|
9657 10871 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
9658 10872 | use ::aws_smithy_http_server::plugin::Plugin;
|
9659 - | let svc = crate::operation_shape::MalformedTimestampHeaderDefault::from_handler(handler);
|
10873 + | let svc = crate::operation_shape::MalformedTimestampPathDefault::from_handler(handler);
|
9660 10874 | let svc = self.model_plugin.apply(svc);
|
9661 10875 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9662 10876 | .apply(svc);
|
9663 10877 | let svc = self.http_plugin.apply(svc);
|
9664 - | self.malformed_timestamp_header_default_custom(svc)
|
10878 + | self.malformed_timestamp_path_default_custom(svc)
|
9665 10879 | }
|
9666 10880 |
|
9667 - | /// Sets the [`MalformedTimestampHeaderDefault`](crate::operation_shape::MalformedTimestampHeaderDefault) operation.
|
10881 + | /// Sets the [`MalformedTimestampPathDefault`](crate::operation_shape::MalformedTimestampPathDefault) operation.
|
9668 10882 | ///
|
9669 10883 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
9670 10884 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
9671 10885 | ///
|
9672 10886 | /// # Example
|
9673 10887 | ///
|
9674 10888 | /// ```no_run
|
9675 10889 | /// use rest_json::{RestJson, RestJsonConfig};
|
9676 10890 | ///
|
9677 10891 | /// use rest_json::{input, output, error};
|
9678 10892 | ///
|
9679 - | /// async fn handler(input: input::MalformedTimestampHeaderDefaultInput) -> Result<output::MalformedTimestampHeaderDefaultOutput, error::MalformedTimestampHeaderDefaultError> {
|
10893 + | /// async fn handler(input: input::MalformedTimestampPathDefaultInput) -> Result<output::MalformedTimestampPathDefaultOutput, error::MalformedTimestampPathDefaultError> {
|
9680 10894 | /// todo!()
|
9681 10895 | /// }
|
9682 10896 | ///
|
9683 10897 | /// let config = RestJsonConfig::builder().build();
|
9684 10898 | /// let svc = ::tower::util::service_fn(handler);
|
9685 10899 | /// let app = RestJson::builder(config)
|
9686 - | /// .malformed_timestamp_header_default_service(svc)
|
10900 + | /// .malformed_timestamp_path_default_service(svc)
|
9687 10901 | /// /* Set other handlers */
|
9688 10902 | /// .build()
|
9689 10903 | /// .unwrap();
|
9690 10904 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9691 10905 | /// ```
|
9692 10906 | ///
|
9693 - | pub fn malformed_timestamp_header_default_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10907 + | pub fn malformed_timestamp_path_default_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9694 10908 | where
|
9695 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampHeaderDefault, ServiceExtractors>,
|
10909 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampPathDefault, ServiceExtractors>,
|
9696 10910 |
|
9697 10911 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
9698 10912 | RestJson<L>,
|
9699 - | crate::operation_shape::MalformedTimestampHeaderDefault,
|
9700 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampHeaderDefault, S>
|
10913 + | crate::operation_shape::MalformedTimestampPathDefault,
|
10914 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampPathDefault, S>
|
9701 10915 | >,
|
9702 10916 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
9703 10917 | RestJson<L>,
|
9704 - | crate::operation_shape::MalformedTimestampHeaderDefault,
|
10918 + | crate::operation_shape::MalformedTimestampPathDefault,
|
9705 10919 | ModelPl::Output
|
9706 10920 | >,
|
9707 10921 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
9708 10922 | RestJson<L>,
|
9709 - | crate::operation_shape::MalformedTimestampHeaderDefault,
|
10923 + | crate::operation_shape::MalformedTimestampPathDefault,
|
9710 10924 | <
|
9711 10925 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9712 10926 | as ::aws_smithy_http_server::plugin::Plugin<
|
9713 10927 | RestJson<L>,
|
9714 - | crate::operation_shape::MalformedTimestampHeaderDefault,
|
10928 + | crate::operation_shape::MalformedTimestampPathDefault,
|
9715 10929 | ModelPl::Output
|
9716 10930 | >
|
9717 10931 | >::Output
|
9718 10932 | >,
|
9719 10933 |
|
9720 10934 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9721 10935 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
9722 10936 |
|
9723 10937 | {
|
9724 10938 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
9725 10939 | use ::aws_smithy_http_server::plugin::Plugin;
|
9726 - | let svc = crate::operation_shape::MalformedTimestampHeaderDefault::from_service(service);
|
10940 + | let svc = crate::operation_shape::MalformedTimestampPathDefault::from_service(service);
|
9727 10941 | let svc = self.model_plugin.apply(svc);
|
9728 10942 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9729 10943 | .apply(svc);
|
9730 10944 | let svc = self.http_plugin.apply(svc);
|
9731 - | self.malformed_timestamp_header_default_custom(svc)
|
10945 + | self.malformed_timestamp_path_default_custom(svc)
|
9732 10946 | }
|
9733 10947 |
|
9734 - | /// Sets the [`MalformedTimestampHeaderDefault`](crate::operation_shape::MalformedTimestampHeaderDefault) to a custom [`Service`](tower::Service).
|
10948 + | /// Sets the [`MalformedTimestampPathDefault`](crate::operation_shape::MalformedTimestampPathDefault) to a custom [`Service`](tower::Service).
|
9735 10949 | /// not constrained by the Smithy contract.
|
9736 - | fn malformed_timestamp_header_default_custom<S>(mut self, svc: S) -> Self
|
10950 + | fn malformed_timestamp_path_default_custom<S>(mut self, svc: S) -> Self
|
9737 10951 | where
|
9738 10952 | S: ::tower::Service<
|
9739 10953 | ::http_1x::Request<Body>,
|
9740 10954 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
9741 10955 | Error = ::std::convert::Infallible,
|
9742 10956 | > + Clone
|
9743 10957 | + Send
|
9744 10958 | + 'static,
|
9745 10959 | S::Future: Send + 'static,
|
9746 10960 | {
|
9747 - | self.malformed_timestamp_header_default =
|
10961 + | self.malformed_timestamp_path_default =
|
9748 10962 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
9749 10963 | self
|
9750 10964 | }
|
9751 10965 |
|
9752 - | /// Sets the [`MalformedTimestampHeaderEpoch`](crate::operation_shape::MalformedTimestampHeaderEpoch) operation.
|
10966 + | /// Sets the [`MalformedTimestampPathEpoch`](crate::operation_shape::MalformedTimestampPathEpoch) operation.
|
9753 10967 | ///
|
9754 10968 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
9755 10969 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
9756 10970 | ///
|
9757 10971 | /// # Example
|
9758 10972 | ///
|
9759 10973 | /// ```no_run
|
9760 10974 | /// use rest_json::{RestJson, RestJsonConfig};
|
9761 10975 | ///
|
9762 10976 | /// use rest_json::{input, output, error};
|
9763 10977 | ///
|
9764 - | /// async fn handler(input: input::MalformedTimestampHeaderEpochInput) -> Result<output::MalformedTimestampHeaderEpochOutput, error::MalformedTimestampHeaderEpochError> {
|
10978 + | /// async fn handler(input: input::MalformedTimestampPathEpochInput) -> Result<output::MalformedTimestampPathEpochOutput, error::MalformedTimestampPathEpochError> {
|
9765 10979 | /// todo!()
|
9766 10980 | /// }
|
9767 10981 | ///
|
9768 10982 | /// let config = RestJsonConfig::builder().build();
|
9769 10983 | /// let app = RestJson::builder(config)
|
9770 - | /// .malformed_timestamp_header_epoch(handler)
|
10984 + | /// .malformed_timestamp_path_epoch(handler)
|
9771 10985 | /// /* Set other handlers */
|
9772 10986 | /// .build()
|
9773 10987 | /// .unwrap();
|
9774 10988 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9775 10989 | /// ```
|
9776 10990 | ///
|
9777 - | pub fn malformed_timestamp_header_epoch<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10991 + | pub fn malformed_timestamp_path_epoch<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9778 10992 | where
|
9779 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampHeaderEpoch, HandlerExtractors>,
|
10993 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampPathEpoch, HandlerExtractors>,
|
9780 10994 |
|
9781 10995 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
9782 10996 | RestJson<L>,
|
9783 - | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
9784 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampHeaderEpoch, HandlerType>
|
10997 + | crate::operation_shape::MalformedTimestampPathEpoch,
|
10998 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampPathEpoch, HandlerType>
|
9785 10999 | >,
|
9786 11000 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
9787 11001 | RestJson<L>,
|
9788 - | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
11002 + | crate::operation_shape::MalformedTimestampPathEpoch,
|
9789 11003 | ModelPl::Output
|
9790 11004 | >,
|
9791 11005 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
9792 11006 | RestJson<L>,
|
9793 - | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
11007 + | crate::operation_shape::MalformedTimestampPathEpoch,
|
9794 11008 | <
|
9795 11009 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9796 11010 | as ::aws_smithy_http_server::plugin::Plugin<
|
9797 11011 | RestJson<L>,
|
9798 - | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
11012 + | crate::operation_shape::MalformedTimestampPathEpoch,
|
9799 11013 | ModelPl::Output
|
9800 11014 | >
|
9801 11015 | >::Output
|
9802 11016 | >,
|
9803 11017 |
|
9804 11018 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9805 11019 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
9806 11020 |
|
9807 11021 | {
|
9808 11022 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
9809 11023 | use ::aws_smithy_http_server::plugin::Plugin;
|
9810 - | let svc = crate::operation_shape::MalformedTimestampHeaderEpoch::from_handler(handler);
|
11024 + | let svc = crate::operation_shape::MalformedTimestampPathEpoch::from_handler(handler);
|
9811 11025 | let svc = self.model_plugin.apply(svc);
|
9812 11026 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9813 11027 | .apply(svc);
|
9814 11028 | let svc = self.http_plugin.apply(svc);
|
9815 - | self.malformed_timestamp_header_epoch_custom(svc)
|
11029 + | self.malformed_timestamp_path_epoch_custom(svc)
|
9816 11030 | }
|
9817 11031 |
|
9818 - | /// Sets the [`MalformedTimestampHeaderEpoch`](crate::operation_shape::MalformedTimestampHeaderEpoch) operation.
|
11032 + | /// Sets the [`MalformedTimestampPathEpoch`](crate::operation_shape::MalformedTimestampPathEpoch) operation.
|
9819 11033 | ///
|
9820 11034 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
9821 11035 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
9822 11036 | ///
|
9823 11037 | /// # Example
|
9824 11038 | ///
|
9825 11039 | /// ```no_run
|
9826 11040 | /// use rest_json::{RestJson, RestJsonConfig};
|
9827 11041 | ///
|
9828 11042 | /// use rest_json::{input, output, error};
|
9829 11043 | ///
|
9830 - | /// async fn handler(input: input::MalformedTimestampHeaderEpochInput) -> Result<output::MalformedTimestampHeaderEpochOutput, error::MalformedTimestampHeaderEpochError> {
|
11044 + | /// async fn handler(input: input::MalformedTimestampPathEpochInput) -> Result<output::MalformedTimestampPathEpochOutput, error::MalformedTimestampPathEpochError> {
|
9831 11045 | /// todo!()
|
9832 11046 | /// }
|
9833 11047 | ///
|
9834 11048 | /// let config = RestJsonConfig::builder().build();
|
9835 11049 | /// let svc = ::tower::util::service_fn(handler);
|
9836 11050 | /// let app = RestJson::builder(config)
|
9837 - | /// .malformed_timestamp_header_epoch_service(svc)
|
11051 + | /// .malformed_timestamp_path_epoch_service(svc)
|
9838 11052 | /// /* Set other handlers */
|
9839 11053 | /// .build()
|
9840 11054 | /// .unwrap();
|
9841 11055 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9842 11056 | /// ```
|
9843 11057 | ///
|
9844 - | pub fn malformed_timestamp_header_epoch_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11058 + | pub fn malformed_timestamp_path_epoch_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9845 11059 | where
|
9846 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampHeaderEpoch, ServiceExtractors>,
|
11060 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampPathEpoch, ServiceExtractors>,
|
9847 11061 |
|
9848 11062 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
9849 11063 | RestJson<L>,
|
9850 - | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
9851 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampHeaderEpoch, S>
|
11064 + | crate::operation_shape::MalformedTimestampPathEpoch,
|
11065 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampPathEpoch, S>
|
9852 11066 | >,
|
9853 11067 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
9854 11068 | RestJson<L>,
|
9855 - | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
11069 + | crate::operation_shape::MalformedTimestampPathEpoch,
|
9856 11070 | ModelPl::Output
|
9857 11071 | >,
|
9858 11072 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
9859 11073 | RestJson<L>,
|
9860 - | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
11074 + | crate::operation_shape::MalformedTimestampPathEpoch,
|
9861 11075 | <
|
9862 11076 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9863 11077 | as ::aws_smithy_http_server::plugin::Plugin<
|
9864 11078 | RestJson<L>,
|
9865 - | crate::operation_shape::MalformedTimestampHeaderEpoch,
|
11079 + | crate::operation_shape::MalformedTimestampPathEpoch,
|
9866 11080 | ModelPl::Output
|
9867 11081 | >
|
9868 11082 | >::Output
|
9869 11083 | >,
|
9870 11084 |
|
9871 11085 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9872 11086 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
9873 11087 |
|
9874 11088 | {
|
9875 11089 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
9876 11090 | use ::aws_smithy_http_server::plugin::Plugin;
|
9877 - | let svc = crate::operation_shape::MalformedTimestampHeaderEpoch::from_service(service);
|
11091 + | let svc = crate::operation_shape::MalformedTimestampPathEpoch::from_service(service);
|
9878 11092 | let svc = self.model_plugin.apply(svc);
|
9879 11093 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9880 11094 | .apply(svc);
|
9881 11095 | let svc = self.http_plugin.apply(svc);
|
9882 - | self.malformed_timestamp_header_epoch_custom(svc)
|
11096 + | self.malformed_timestamp_path_epoch_custom(svc)
|
9883 11097 | }
|
9884 11098 |
|
9885 - | /// Sets the [`MalformedTimestampHeaderEpoch`](crate::operation_shape::MalformedTimestampHeaderEpoch) to a custom [`Service`](tower::Service).
|
11099 + | /// Sets the [`MalformedTimestampPathEpoch`](crate::operation_shape::MalformedTimestampPathEpoch) to a custom [`Service`](tower::Service).
|
9886 11100 | /// not constrained by the Smithy contract.
|
9887 - | fn malformed_timestamp_header_epoch_custom<S>(mut self, svc: S) -> Self
|
11101 + | fn malformed_timestamp_path_epoch_custom<S>(mut self, svc: S) -> Self
|
9888 11102 | where
|
9889 11103 | S: ::tower::Service<
|
9890 11104 | ::http_1x::Request<Body>,
|
9891 11105 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
9892 11106 | Error = ::std::convert::Infallible,
|
9893 11107 | > + Clone
|
9894 11108 | + Send
|
9895 11109 | + 'static,
|
9896 11110 | S::Future: Send + 'static,
|
9897 11111 | {
|
9898 - | self.malformed_timestamp_header_epoch =
|
11112 + | self.malformed_timestamp_path_epoch =
|
9899 11113 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
9900 11114 | self
|
9901 11115 | }
|
9902 11116 |
|
9903 - | /// Sets the [`MalformedTimestampPathDefault`](crate::operation_shape::MalformedTimestampPathDefault) operation.
|
11117 + | /// Sets the [`MalformedTimestampPathHttpDate`](crate::operation_shape::MalformedTimestampPathHttpDate) operation.
|
9904 11118 | ///
|
9905 11119 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
9906 11120 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
9907 11121 | ///
|
9908 11122 | /// # Example
|
9909 11123 | ///
|
9910 11124 | /// ```no_run
|
9911 11125 | /// use rest_json::{RestJson, RestJsonConfig};
|
9912 11126 | ///
|
9913 11127 | /// use rest_json::{input, output, error};
|
9914 11128 | ///
|
9915 - | /// async fn handler(input: input::MalformedTimestampPathDefaultInput) -> Result<output::MalformedTimestampPathDefaultOutput, error::MalformedTimestampPathDefaultError> {
|
11129 + | /// async fn handler(input: input::MalformedTimestampPathHttpDateInput) -> Result<output::MalformedTimestampPathHttpDateOutput, error::MalformedTimestampPathHttpDateError> {
|
9916 11130 | /// todo!()
|
9917 11131 | /// }
|
9918 11132 | ///
|
9919 11133 | /// let config = RestJsonConfig::builder().build();
|
9920 11134 | /// let app = RestJson::builder(config)
|
9921 - | /// .malformed_timestamp_path_default(handler)
|
11135 + | /// .malformed_timestamp_path_http_date(handler)
|
9922 11136 | /// /* Set other handlers */
|
9923 11137 | /// .build()
|
9924 11138 | /// .unwrap();
|
9925 11139 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9926 11140 | /// ```
|
9927 11141 | ///
|
9928 - | pub fn malformed_timestamp_path_default<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11142 + | pub fn malformed_timestamp_path_http_date<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
9929 11143 | where
|
9930 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampPathDefault, HandlerExtractors>,
|
11144 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampPathHttpDate, HandlerExtractors>,
|
9931 11145 |
|
9932 11146 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
9933 11147 | RestJson<L>,
|
9934 - | crate::operation_shape::MalformedTimestampPathDefault,
|
9935 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampPathDefault, HandlerType>
|
11148 + | crate::operation_shape::MalformedTimestampPathHttpDate,
|
11149 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampPathHttpDate, HandlerType>
|
9936 11150 | >,
|
9937 11151 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
9938 11152 | RestJson<L>,
|
9939 - | crate::operation_shape::MalformedTimestampPathDefault,
|
11153 + | crate::operation_shape::MalformedTimestampPathHttpDate,
|
9940 11154 | ModelPl::Output
|
9941 11155 | >,
|
9942 11156 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
9943 11157 | RestJson<L>,
|
9944 - | crate::operation_shape::MalformedTimestampPathDefault,
|
11158 + | crate::operation_shape::MalformedTimestampPathHttpDate,
|
9945 11159 | <
|
9946 11160 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
9947 11161 | as ::aws_smithy_http_server::plugin::Plugin<
|
9948 11162 | RestJson<L>,
|
9949 - | crate::operation_shape::MalformedTimestampPathDefault,
|
11163 + | crate::operation_shape::MalformedTimestampPathHttpDate,
|
9950 11164 | ModelPl::Output
|
9951 11165 | >
|
9952 11166 | >::Output
|
9953 11167 | >,
|
9954 11168 |
|
9955 11169 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
9956 11170 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
9957 11171 |
|
9958 11172 | {
|
9959 11173 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
9960 11174 | use ::aws_smithy_http_server::plugin::Plugin;
|
9961 - | let svc = crate::operation_shape::MalformedTimestampPathDefault::from_handler(handler);
|
11175 + | let svc = crate::operation_shape::MalformedTimestampPathHttpDate::from_handler(handler);
|
9962 11176 | let svc = self.model_plugin.apply(svc);
|
9963 11177 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
9964 11178 | .apply(svc);
|
9965 11179 | let svc = self.http_plugin.apply(svc);
|
9966 - | self.malformed_timestamp_path_default_custom(svc)
|
11180 + | self.malformed_timestamp_path_http_date_custom(svc)
|
9967 11181 | }
|
9968 11182 |
|
9969 - | /// Sets the [`MalformedTimestampPathDefault`](crate::operation_shape::MalformedTimestampPathDefault) operation.
|
11183 + | /// Sets the [`MalformedTimestampPathHttpDate`](crate::operation_shape::MalformedTimestampPathHttpDate) operation.
|
9970 11184 | ///
|
9971 11185 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
9972 11186 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
9973 11187 | ///
|
9974 11188 | /// # Example
|
9975 11189 | ///
|
9976 11190 | /// ```no_run
|
9977 11191 | /// use rest_json::{RestJson, RestJsonConfig};
|
9978 11192 | ///
|
9979 11193 | /// use rest_json::{input, output, error};
|
9980 11194 | ///
|
9981 - | /// async fn handler(input: input::MalformedTimestampPathDefaultInput) -> Result<output::MalformedTimestampPathDefaultOutput, error::MalformedTimestampPathDefaultError> {
|
11195 + | /// async fn handler(input: input::MalformedTimestampPathHttpDateInput) -> Result<output::MalformedTimestampPathHttpDateOutput, error::MalformedTimestampPathHttpDateError> {
|
9982 11196 | /// todo!()
|
9983 11197 | /// }
|
9984 11198 | ///
|
9985 11199 | /// let config = RestJsonConfig::builder().build();
|
9986 11200 | /// let svc = ::tower::util::service_fn(handler);
|
9987 11201 | /// let app = RestJson::builder(config)
|
9988 - | /// .malformed_timestamp_path_default_service(svc)
|
11202 + | /// .malformed_timestamp_path_http_date_service(svc)
|
9989 11203 | /// /* Set other handlers */
|
9990 11204 | /// .build()
|
9991 11205 | /// .unwrap();
|
9992 11206 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
9993 11207 | /// ```
|
9994 11208 | ///
|
9995 - | pub fn malformed_timestamp_path_default_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11209 + | pub fn malformed_timestamp_path_http_date_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
9996 11210 | where
|
9997 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampPathDefault, ServiceExtractors>,
|
11211 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampPathHttpDate, ServiceExtractors>,
|
9998 11212 |
|
9999 11213 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
10000 11214 | RestJson<L>,
|
10001 - | crate::operation_shape::MalformedTimestampPathDefault,
|
10002 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampPathDefault, S>
|
11215 + | crate::operation_shape::MalformedTimestampPathHttpDate,
|
11216 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampPathHttpDate, S>
|
10003 11217 | >,
|
10004 11218 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
10005 11219 | RestJson<L>,
|
10006 - | crate::operation_shape::MalformedTimestampPathDefault,
|
11220 + | crate::operation_shape::MalformedTimestampPathHttpDate,
|
10007 11221 | ModelPl::Output
|
10008 11222 | >,
|
10009 11223 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
10010 11224 | RestJson<L>,
|
10011 - | crate::operation_shape::MalformedTimestampPathDefault,
|
11225 + | crate::operation_shape::MalformedTimestampPathHttpDate,
|
10012 11226 | <
|
10013 11227 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10014 11228 | as ::aws_smithy_http_server::plugin::Plugin<
|
10015 11229 | RestJson<L>,
|
10016 - | crate::operation_shape::MalformedTimestampPathDefault,
|
11230 + | crate::operation_shape::MalformedTimestampPathHttpDate,
|
10017 11231 | ModelPl::Output
|
10018 11232 | >
|
10019 11233 | >::Output
|
10020 11234 | >,
|
10021 11235 |
|
10022 11236 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10023 11237 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
10024 11238 |
|
10025 11239 | {
|
10026 11240 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
10027 11241 | use ::aws_smithy_http_server::plugin::Plugin;
|
10028 - | let svc = crate::operation_shape::MalformedTimestampPathDefault::from_service(service);
|
11242 + | let svc = crate::operation_shape::MalformedTimestampPathHttpDate::from_service(service);
|
10029 11243 | let svc = self.model_plugin.apply(svc);
|
10030 11244 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10031 11245 | .apply(svc);
|
10032 11246 | let svc = self.http_plugin.apply(svc);
|
10033 - | self.malformed_timestamp_path_default_custom(svc)
|
11247 + | self.malformed_timestamp_path_http_date_custom(svc)
|
10034 11248 | }
|
10035 11249 |
|
10036 - | /// Sets the [`MalformedTimestampPathDefault`](crate::operation_shape::MalformedTimestampPathDefault) to a custom [`Service`](tower::Service).
|
11250 + | /// Sets the [`MalformedTimestampPathHttpDate`](crate::operation_shape::MalformedTimestampPathHttpDate) to a custom [`Service`](tower::Service).
|
10037 11251 | /// not constrained by the Smithy contract.
|
10038 - | fn malformed_timestamp_path_default_custom<S>(mut self, svc: S) -> Self
|
11252 + | fn malformed_timestamp_path_http_date_custom<S>(mut self, svc: S) -> Self
|
10039 11253 | where
|
10040 11254 | S: ::tower::Service<
|
10041 11255 | ::http_1x::Request<Body>,
|
10042 11256 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
10043 11257 | Error = ::std::convert::Infallible,
|
10044 11258 | > + Clone
|
10045 11259 | + Send
|
10046 11260 | + 'static,
|
10047 11261 | S::Future: Send + 'static,
|
10048 11262 | {
|
10049 - | self.malformed_timestamp_path_default =
|
11263 + | self.malformed_timestamp_path_http_date =
|
10050 11264 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
10051 11265 | self
|
10052 11266 | }
|
10053 11267 |
|
10054 - | /// Sets the [`MalformedTimestampPathEpoch`](crate::operation_shape::MalformedTimestampPathEpoch) operation.
|
11268 + | /// Sets the [`MalformedTimestampQueryDefault`](crate::operation_shape::MalformedTimestampQueryDefault) operation.
|
10055 11269 | ///
|
10056 11270 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
10057 11271 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
10058 11272 | ///
|
10059 11273 | /// # Example
|
10060 11274 | ///
|
10061 11275 | /// ```no_run
|
10062 11276 | /// use rest_json::{RestJson, RestJsonConfig};
|
10063 11277 | ///
|
10064 11278 | /// use rest_json::{input, output, error};
|
10065 11279 | ///
|
10066 - | /// async fn handler(input: input::MalformedTimestampPathEpochInput) -> Result<output::MalformedTimestampPathEpochOutput, error::MalformedTimestampPathEpochError> {
|
11280 + | /// async fn handler(input: input::MalformedTimestampQueryDefaultInput) -> Result<output::MalformedTimestampQueryDefaultOutput, error::MalformedTimestampQueryDefaultError> {
|
10067 11281 | /// todo!()
|
10068 11282 | /// }
|
10069 11283 | ///
|
10070 11284 | /// let config = RestJsonConfig::builder().build();
|
10071 11285 | /// let app = RestJson::builder(config)
|
10072 - | /// .malformed_timestamp_path_epoch(handler)
|
11286 + | /// .malformed_timestamp_query_default(handler)
|
10073 11287 | /// /* Set other handlers */
|
10074 11288 | /// .build()
|
10075 11289 | /// .unwrap();
|
10076 11290 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10077 11291 | /// ```
|
10078 11292 | ///
|
10079 - | pub fn malformed_timestamp_path_epoch<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11293 + | pub fn malformed_timestamp_query_default<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10080 11294 | where
|
10081 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampPathEpoch, HandlerExtractors>,
|
11295 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampQueryDefault, HandlerExtractors>,
|
10082 11296 |
|
10083 11297 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
10084 11298 | RestJson<L>,
|
10085 - | crate::operation_shape::MalformedTimestampPathEpoch,
|
10086 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampPathEpoch, HandlerType>
|
11299 + | crate::operation_shape::MalformedTimestampQueryDefault,
|
11300 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampQueryDefault, HandlerType>
|
10087 11301 | >,
|
10088 11302 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
10089 11303 | RestJson<L>,
|
10090 - | crate::operation_shape::MalformedTimestampPathEpoch,
|
11304 + | crate::operation_shape::MalformedTimestampQueryDefault,
|
10091 11305 | ModelPl::Output
|
10092 11306 | >,
|
10093 11307 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
10094 11308 | RestJson<L>,
|
10095 - | crate::operation_shape::MalformedTimestampPathEpoch,
|
11309 + | crate::operation_shape::MalformedTimestampQueryDefault,
|
10096 11310 | <
|
10097 11311 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10098 11312 | as ::aws_smithy_http_server::plugin::Plugin<
|
10099 11313 | RestJson<L>,
|
10100 - | crate::operation_shape::MalformedTimestampPathEpoch,
|
11314 + | crate::operation_shape::MalformedTimestampQueryDefault,
|
10101 11315 | ModelPl::Output
|
10102 11316 | >
|
10103 11317 | >::Output
|
10104 11318 | >,
|
10105 11319 |
|
10106 11320 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10107 11321 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
10108 11322 |
|
10109 11323 | {
|
10110 11324 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
10111 11325 | use ::aws_smithy_http_server::plugin::Plugin;
|
10112 - | let svc = crate::operation_shape::MalformedTimestampPathEpoch::from_handler(handler);
|
11326 + | let svc = crate::operation_shape::MalformedTimestampQueryDefault::from_handler(handler);
|
10113 11327 | let svc = self.model_plugin.apply(svc);
|
10114 11328 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10115 11329 | .apply(svc);
|
10116 11330 | let svc = self.http_plugin.apply(svc);
|
10117 - | self.malformed_timestamp_path_epoch_custom(svc)
|
11331 + | self.malformed_timestamp_query_default_custom(svc)
|
10118 11332 | }
|
10119 11333 |
|
10120 - | /// Sets the [`MalformedTimestampPathEpoch`](crate::operation_shape::MalformedTimestampPathEpoch) operation.
|
11334 + | /// Sets the [`MalformedTimestampQueryDefault`](crate::operation_shape::MalformedTimestampQueryDefault) operation.
|
10121 11335 | ///
|
10122 11336 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
10123 11337 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
10124 11338 | ///
|
10125 11339 | /// # Example
|
10126 11340 | ///
|
10127 11341 | /// ```no_run
|
10128 11342 | /// use rest_json::{RestJson, RestJsonConfig};
|
10129 11343 | ///
|
10130 11344 | /// use rest_json::{input, output, error};
|
10131 11345 | ///
|
10132 - | /// async fn handler(input: input::MalformedTimestampPathEpochInput) -> Result<output::MalformedTimestampPathEpochOutput, error::MalformedTimestampPathEpochError> {
|
11346 + | /// async fn handler(input: input::MalformedTimestampQueryDefaultInput) -> Result<output::MalformedTimestampQueryDefaultOutput, error::MalformedTimestampQueryDefaultError> {
|
10133 11347 | /// todo!()
|
10134 11348 | /// }
|
10135 11349 | ///
|
10136 11350 | /// let config = RestJsonConfig::builder().build();
|
10137 11351 | /// let svc = ::tower::util::service_fn(handler);
|
10138 11352 | /// let app = RestJson::builder(config)
|
10139 - | /// .malformed_timestamp_path_epoch_service(svc)
|
11353 + | /// .malformed_timestamp_query_default_service(svc)
|
10140 11354 | /// /* Set other handlers */
|
10141 11355 | /// .build()
|
10142 11356 | /// .unwrap();
|
10143 11357 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10144 11358 | /// ```
|
10145 11359 | ///
|
10146 - | pub fn malformed_timestamp_path_epoch_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11360 + | pub fn malformed_timestamp_query_default_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10147 11361 | where
|
10148 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampPathEpoch, ServiceExtractors>,
|
11362 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampQueryDefault, ServiceExtractors>,
|
10149 11363 |
|
10150 11364 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
10151 11365 | RestJson<L>,
|
10152 - | crate::operation_shape::MalformedTimestampPathEpoch,
|
10153 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampPathEpoch, S>
|
11366 + | crate::operation_shape::MalformedTimestampQueryDefault,
|
11367 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampQueryDefault, S>
|
10154 11368 | >,
|
10155 11369 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
10156 11370 | RestJson<L>,
|
10157 - | crate::operation_shape::MalformedTimestampPathEpoch,
|
11371 + | crate::operation_shape::MalformedTimestampQueryDefault,
|
10158 11372 | ModelPl::Output
|
10159 11373 | >,
|
10160 11374 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
10161 11375 | RestJson<L>,
|
10162 - | crate::operation_shape::MalformedTimestampPathEpoch,
|
11376 + | crate::operation_shape::MalformedTimestampQueryDefault,
|
10163 11377 | <
|
10164 11378 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10165 11379 | as ::aws_smithy_http_server::plugin::Plugin<
|
10166 11380 | RestJson<L>,
|
10167 - | crate::operation_shape::MalformedTimestampPathEpoch,
|
11381 + | crate::operation_shape::MalformedTimestampQueryDefault,
|
10168 11382 | ModelPl::Output
|
10169 11383 | >
|
10170 11384 | >::Output
|
10171 11385 | >,
|
10172 11386 |
|
10173 11387 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10174 11388 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
10175 11389 |
|
10176 11390 | {
|
10177 11391 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
10178 11392 | use ::aws_smithy_http_server::plugin::Plugin;
|
10179 - | let svc = crate::operation_shape::MalformedTimestampPathEpoch::from_service(service);
|
11393 + | let svc = crate::operation_shape::MalformedTimestampQueryDefault::from_service(service);
|
10180 11394 | let svc = self.model_plugin.apply(svc);
|
10181 11395 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10182 11396 | .apply(svc);
|
10183 11397 | let svc = self.http_plugin.apply(svc);
|
10184 - | self.malformed_timestamp_path_epoch_custom(svc)
|
11398 + | self.malformed_timestamp_query_default_custom(svc)
|
10185 11399 | }
|
10186 11400 |
|
10187 - | /// Sets the [`MalformedTimestampPathEpoch`](crate::operation_shape::MalformedTimestampPathEpoch) to a custom [`Service`](tower::Service).
|
11401 + | /// Sets the [`MalformedTimestampQueryDefault`](crate::operation_shape::MalformedTimestampQueryDefault) to a custom [`Service`](tower::Service).
|
10188 11402 | /// not constrained by the Smithy contract.
|
10189 - | fn malformed_timestamp_path_epoch_custom<S>(mut self, svc: S) -> Self
|
11403 + | fn malformed_timestamp_query_default_custom<S>(mut self, svc: S) -> Self
|
10190 11404 | where
|
10191 11405 | S: ::tower::Service<
|
10192 11406 | ::http_1x::Request<Body>,
|
10193 11407 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
10194 11408 | Error = ::std::convert::Infallible,
|
10195 11409 | > + Clone
|
10196 11410 | + Send
|
10197 11411 | + 'static,
|
10198 11412 | S::Future: Send + 'static,
|
10199 11413 | {
|
10200 - | self.malformed_timestamp_path_epoch =
|
11414 + | self.malformed_timestamp_query_default =
|
10201 11415 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
10202 11416 | self
|
10203 11417 | }
|
10204 11418 |
|
10205 - | /// Sets the [`MalformedTimestampPathHttpDate`](crate::operation_shape::MalformedTimestampPathHttpDate) operation.
|
11419 + | /// Sets the [`MalformedTimestampQueryEpoch`](crate::operation_shape::MalformedTimestampQueryEpoch) operation.
|
10206 11420 | ///
|
10207 11421 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
10208 11422 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
10209 11423 | ///
|
10210 11424 | /// # Example
|
10211 11425 | ///
|
10212 11426 | /// ```no_run
|
10213 11427 | /// use rest_json::{RestJson, RestJsonConfig};
|
10214 11428 | ///
|
10215 11429 | /// use rest_json::{input, output, error};
|
10216 11430 | ///
|
10217 - | /// async fn handler(input: input::MalformedTimestampPathHttpDateInput) -> Result<output::MalformedTimestampPathHttpDateOutput, error::MalformedTimestampPathHttpDateError> {
|
11431 + | /// async fn handler(input: input::MalformedTimestampQueryEpochInput) -> Result<output::MalformedTimestampQueryEpochOutput, error::MalformedTimestampQueryEpochError> {
|
10218 11432 | /// todo!()
|
10219 11433 | /// }
|
10220 11434 | ///
|
10221 11435 | /// let config = RestJsonConfig::builder().build();
|
10222 11436 | /// let app = RestJson::builder(config)
|
10223 - | /// .malformed_timestamp_path_http_date(handler)
|
11437 + | /// .malformed_timestamp_query_epoch(handler)
|
10224 11438 | /// /* Set other handlers */
|
10225 11439 | /// .build()
|
10226 11440 | /// .unwrap();
|
10227 11441 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10228 11442 | /// ```
|
10229 11443 | ///
|
10230 - | pub fn malformed_timestamp_path_http_date<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11444 + | pub fn malformed_timestamp_query_epoch<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10231 11445 | where
|
10232 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampPathHttpDate, HandlerExtractors>,
|
11446 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampQueryEpoch, HandlerExtractors>,
|
10233 11447 |
|
10234 11448 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
10235 11449 | RestJson<L>,
|
10236 - | crate::operation_shape::MalformedTimestampPathHttpDate,
|
10237 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampPathHttpDate, HandlerType>
|
11450 + | crate::operation_shape::MalformedTimestampQueryEpoch,
|
11451 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampQueryEpoch, HandlerType>
|
10238 11452 | >,
|
10239 11453 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
10240 11454 | RestJson<L>,
|
10241 - | crate::operation_shape::MalformedTimestampPathHttpDate,
|
11455 + | crate::operation_shape::MalformedTimestampQueryEpoch,
|
10242 11456 | ModelPl::Output
|
10243 11457 | >,
|
10244 11458 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
10245 11459 | RestJson<L>,
|
10246 - | crate::operation_shape::MalformedTimestampPathHttpDate,
|
11460 + | crate::operation_shape::MalformedTimestampQueryEpoch,
|
10247 11461 | <
|
10248 11462 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10249 11463 | as ::aws_smithy_http_server::plugin::Plugin<
|
10250 11464 | RestJson<L>,
|
10251 - | crate::operation_shape::MalformedTimestampPathHttpDate,
|
11465 + | crate::operation_shape::MalformedTimestampQueryEpoch,
|
10252 11466 | ModelPl::Output
|
10253 11467 | >
|
10254 11468 | >::Output
|
10255 11469 | >,
|
10256 11470 |
|
10257 11471 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10258 11472 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
10259 11473 |
|
10260 11474 | {
|
10261 11475 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
10262 11476 | use ::aws_smithy_http_server::plugin::Plugin;
|
10263 - | let svc = crate::operation_shape::MalformedTimestampPathHttpDate::from_handler(handler);
|
11477 + | let svc = crate::operation_shape::MalformedTimestampQueryEpoch::from_handler(handler);
|
10264 11478 | let svc = self.model_plugin.apply(svc);
|
10265 11479 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10266 11480 | .apply(svc);
|
10267 11481 | let svc = self.http_plugin.apply(svc);
|
10268 - | self.malformed_timestamp_path_http_date_custom(svc)
|
11482 + | self.malformed_timestamp_query_epoch_custom(svc)
|
10269 11483 | }
|
10270 11484 |
|
10271 - | /// Sets the [`MalformedTimestampPathHttpDate`](crate::operation_shape::MalformedTimestampPathHttpDate) operation.
|
11485 + | /// Sets the [`MalformedTimestampQueryEpoch`](crate::operation_shape::MalformedTimestampQueryEpoch) operation.
|
10272 11486 | ///
|
10273 11487 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
10274 11488 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
10275 11489 | ///
|
10276 11490 | /// # Example
|
10277 11491 | ///
|
10278 11492 | /// ```no_run
|
10279 11493 | /// use rest_json::{RestJson, RestJsonConfig};
|
10280 11494 | ///
|
10281 11495 | /// use rest_json::{input, output, error};
|
10282 11496 | ///
|
10283 - | /// async fn handler(input: input::MalformedTimestampPathHttpDateInput) -> Result<output::MalformedTimestampPathHttpDateOutput, error::MalformedTimestampPathHttpDateError> {
|
11497 + | /// async fn handler(input: input::MalformedTimestampQueryEpochInput) -> Result<output::MalformedTimestampQueryEpochOutput, error::MalformedTimestampQueryEpochError> {
|
10284 11498 | /// todo!()
|
10285 11499 | /// }
|
10286 11500 | ///
|
10287 11501 | /// let config = RestJsonConfig::builder().build();
|
10288 11502 | /// let svc = ::tower::util::service_fn(handler);
|
10289 11503 | /// let app = RestJson::builder(config)
|
10290 - | /// .malformed_timestamp_path_http_date_service(svc)
|
11504 + | /// .malformed_timestamp_query_epoch_service(svc)
|
10291 11505 | /// /* Set other handlers */
|
10292 11506 | /// .build()
|
10293 11507 | /// .unwrap();
|
10294 11508 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10295 11509 | /// ```
|
10296 11510 | ///
|
10297 - | pub fn malformed_timestamp_path_http_date_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11511 + | pub fn malformed_timestamp_query_epoch_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10298 11512 | where
|
10299 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampPathHttpDate, ServiceExtractors>,
|
11513 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampQueryEpoch, ServiceExtractors>,
|
10300 11514 |
|
10301 11515 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
10302 11516 | RestJson<L>,
|
10303 - | crate::operation_shape::MalformedTimestampPathHttpDate,
|
10304 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampPathHttpDate, S>
|
11517 + | crate::operation_shape::MalformedTimestampQueryEpoch,
|
11518 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampQueryEpoch, S>
|
10305 11519 | >,
|
10306 11520 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
10307 11521 | RestJson<L>,
|
10308 - | crate::operation_shape::MalformedTimestampPathHttpDate,
|
11522 + | crate::operation_shape::MalformedTimestampQueryEpoch,
|
10309 11523 | ModelPl::Output
|
10310 11524 | >,
|
10311 11525 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
10312 11526 | RestJson<L>,
|
10313 - | crate::operation_shape::MalformedTimestampPathHttpDate,
|
11527 + | crate::operation_shape::MalformedTimestampQueryEpoch,
|
10314 11528 | <
|
10315 11529 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10316 11530 | as ::aws_smithy_http_server::plugin::Plugin<
|
10317 11531 | RestJson<L>,
|
10318 - | crate::operation_shape::MalformedTimestampPathHttpDate,
|
11532 + | crate::operation_shape::MalformedTimestampQueryEpoch,
|
10319 11533 | ModelPl::Output
|
10320 11534 | >
|
10321 11535 | >::Output
|
10322 11536 | >,
|
10323 11537 |
|
10324 11538 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10325 11539 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
10326 11540 |
|
10327 11541 | {
|
10328 11542 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
10329 11543 | use ::aws_smithy_http_server::plugin::Plugin;
|
10330 - | let svc = crate::operation_shape::MalformedTimestampPathHttpDate::from_service(service);
|
11544 + | let svc = crate::operation_shape::MalformedTimestampQueryEpoch::from_service(service);
|
10331 11545 | let svc = self.model_plugin.apply(svc);
|
10332 11546 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10333 11547 | .apply(svc);
|
10334 11548 | let svc = self.http_plugin.apply(svc);
|
10335 - | self.malformed_timestamp_path_http_date_custom(svc)
|
11549 + | self.malformed_timestamp_query_epoch_custom(svc)
|
10336 11550 | }
|
10337 11551 |
|
10338 - | /// Sets the [`MalformedTimestampPathHttpDate`](crate::operation_shape::MalformedTimestampPathHttpDate) to a custom [`Service`](tower::Service).
|
11552 + | /// Sets the [`MalformedTimestampQueryEpoch`](crate::operation_shape::MalformedTimestampQueryEpoch) to a custom [`Service`](tower::Service).
|
10339 11553 | /// not constrained by the Smithy contract.
|
10340 - | fn malformed_timestamp_path_http_date_custom<S>(mut self, svc: S) -> Self
|
11554 + | fn malformed_timestamp_query_epoch_custom<S>(mut self, svc: S) -> Self
|
10341 11555 | where
|
10342 11556 | S: ::tower::Service<
|
10343 11557 | ::http_1x::Request<Body>,
|
10344 11558 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
10345 11559 | Error = ::std::convert::Infallible,
|
10346 11560 | > + Clone
|
10347 11561 | + Send
|
10348 11562 | + 'static,
|
10349 11563 | S::Future: Send + 'static,
|
10350 11564 | {
|
10351 - | self.malformed_timestamp_path_http_date =
|
11565 + | self.malformed_timestamp_query_epoch =
|
10352 11566 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
10353 11567 | self
|
10354 11568 | }
|
10355 11569 |
|
10356 - | /// Sets the [`MalformedTimestampQueryDefault`](crate::operation_shape::MalformedTimestampQueryDefault) operation.
|
11570 + | /// Sets the [`MalformedTimestampQueryHttpDate`](crate::operation_shape::MalformedTimestampQueryHttpDate) operation.
|
10357 11571 | ///
|
10358 11572 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
10359 11573 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
10360 11574 | ///
|
10361 11575 | /// # Example
|
10362 11576 | ///
|
10363 11577 | /// ```no_run
|
10364 11578 | /// use rest_json::{RestJson, RestJsonConfig};
|
10365 11579 | ///
|
10366 11580 | /// use rest_json::{input, output, error};
|
10367 11581 | ///
|
10368 - | /// async fn handler(input: input::MalformedTimestampQueryDefaultInput) -> Result<output::MalformedTimestampQueryDefaultOutput, error::MalformedTimestampQueryDefaultError> {
|
11582 + | /// async fn handler(input: input::MalformedTimestampQueryHttpDateInput) -> Result<output::MalformedTimestampQueryHttpDateOutput, error::MalformedTimestampQueryHttpDateError> {
|
10369 11583 | /// todo!()
|
10370 11584 | /// }
|
10371 11585 | ///
|
10372 11586 | /// let config = RestJsonConfig::builder().build();
|
10373 11587 | /// let app = RestJson::builder(config)
|
10374 - | /// .malformed_timestamp_query_default(handler)
|
11588 + | /// .malformed_timestamp_query_http_date(handler)
|
10375 11589 | /// /* Set other handlers */
|
10376 11590 | /// .build()
|
10377 11591 | /// .unwrap();
|
10378 11592 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10379 11593 | /// ```
|
10380 11594 | ///
|
10381 - | pub fn malformed_timestamp_query_default<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11595 + | pub fn malformed_timestamp_query_http_date<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10382 11596 | where
|
10383 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampQueryDefault, HandlerExtractors>,
|
11597 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampQueryHttpDate, HandlerExtractors>,
|
10384 11598 |
|
10385 11599 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
10386 11600 | RestJson<L>,
|
10387 - | crate::operation_shape::MalformedTimestampQueryDefault,
|
10388 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampQueryDefault, HandlerType>
|
11601 + | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
11602 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampQueryHttpDate, HandlerType>
|
10389 11603 | >,
|
10390 11604 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
10391 11605 | RestJson<L>,
|
10392 - | crate::operation_shape::MalformedTimestampQueryDefault,
|
11606 + | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
10393 11607 | ModelPl::Output
|
10394 11608 | >,
|
10395 11609 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
10396 11610 | RestJson<L>,
|
10397 - | crate::operation_shape::MalformedTimestampQueryDefault,
|
11611 + | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
10398 11612 | <
|
10399 11613 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10400 11614 | as ::aws_smithy_http_server::plugin::Plugin<
|
10401 11615 | RestJson<L>,
|
10402 - | crate::operation_shape::MalformedTimestampQueryDefault,
|
11616 + | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
10403 11617 | ModelPl::Output
|
10404 11618 | >
|
10405 11619 | >::Output
|
10406 11620 | >,
|
10407 11621 |
|
10408 11622 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10409 11623 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
10410 11624 |
|
10411 11625 | {
|
10412 11626 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
10413 11627 | use ::aws_smithy_http_server::plugin::Plugin;
|
10414 - | let svc = crate::operation_shape::MalformedTimestampQueryDefault::from_handler(handler);
|
11628 + | let svc = crate::operation_shape::MalformedTimestampQueryHttpDate::from_handler(handler);
|
10415 11629 | let svc = self.model_plugin.apply(svc);
|
10416 11630 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10417 11631 | .apply(svc);
|
10418 11632 | let svc = self.http_plugin.apply(svc);
|
10419 - | self.malformed_timestamp_query_default_custom(svc)
|
11633 + | self.malformed_timestamp_query_http_date_custom(svc)
|
10420 11634 | }
|
10421 11635 |
|
10422 - | /// Sets the [`MalformedTimestampQueryDefault`](crate::operation_shape::MalformedTimestampQueryDefault) operation.
|
11636 + | /// Sets the [`MalformedTimestampQueryHttpDate`](crate::operation_shape::MalformedTimestampQueryHttpDate) operation.
|
10423 11637 | ///
|
10424 11638 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
10425 11639 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
10426 11640 | ///
|
10427 11641 | /// # Example
|
10428 11642 | ///
|
10429 11643 | /// ```no_run
|
10430 11644 | /// use rest_json::{RestJson, RestJsonConfig};
|
10431 11645 | ///
|
10432 11646 | /// use rest_json::{input, output, error};
|
10433 11647 | ///
|
10434 - | /// async fn handler(input: input::MalformedTimestampQueryDefaultInput) -> Result<output::MalformedTimestampQueryDefaultOutput, error::MalformedTimestampQueryDefaultError> {
|
11648 + | /// async fn handler(input: input::MalformedTimestampQueryHttpDateInput) -> Result<output::MalformedTimestampQueryHttpDateOutput, error::MalformedTimestampQueryHttpDateError> {
|
10435 11649 | /// todo!()
|
10436 11650 | /// }
|
10437 11651 | ///
|
10438 11652 | /// let config = RestJsonConfig::builder().build();
|
10439 11653 | /// let svc = ::tower::util::service_fn(handler);
|
10440 11654 | /// let app = RestJson::builder(config)
|
10441 - | /// .malformed_timestamp_query_default_service(svc)
|
11655 + | /// .malformed_timestamp_query_http_date_service(svc)
|
10442 11656 | /// /* Set other handlers */
|
10443 11657 | /// .build()
|
10444 11658 | /// .unwrap();
|
10445 11659 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10446 11660 | /// ```
|
10447 11661 | ///
|
10448 - | pub fn malformed_timestamp_query_default_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11662 + | pub fn malformed_timestamp_query_http_date_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10449 11663 | where
|
10450 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampQueryDefault, ServiceExtractors>,
|
11664 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampQueryHttpDate, ServiceExtractors>,
|
10451 11665 |
|
10452 11666 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
10453 11667 | RestJson<L>,
|
10454 - | crate::operation_shape::MalformedTimestampQueryDefault,
|
10455 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampQueryDefault, S>
|
11668 + | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
11669 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampQueryHttpDate, S>
|
10456 11670 | >,
|
10457 11671 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
10458 11672 | RestJson<L>,
|
10459 - | crate::operation_shape::MalformedTimestampQueryDefault,
|
11673 + | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
10460 11674 | ModelPl::Output
|
10461 11675 | >,
|
10462 11676 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
10463 11677 | RestJson<L>,
|
10464 - | crate::operation_shape::MalformedTimestampQueryDefault,
|
11678 + | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
10465 11679 | <
|
10466 11680 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10467 11681 | as ::aws_smithy_http_server::plugin::Plugin<
|
10468 11682 | RestJson<L>,
|
10469 - | crate::operation_shape::MalformedTimestampQueryDefault,
|
11683 + | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
10470 11684 | ModelPl::Output
|
10471 11685 | >
|
10472 11686 | >::Output
|
10473 11687 | >,
|
10474 11688 |
|
10475 11689 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10476 11690 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
10477 11691 |
|
10478 11692 | {
|
10479 11693 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
10480 11694 | use ::aws_smithy_http_server::plugin::Plugin;
|
10481 - | let svc = crate::operation_shape::MalformedTimestampQueryDefault::from_service(service);
|
11695 + | let svc = crate::operation_shape::MalformedTimestampQueryHttpDate::from_service(service);
|
10482 11696 | let svc = self.model_plugin.apply(svc);
|
10483 11697 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10484 11698 | .apply(svc);
|
10485 11699 | let svc = self.http_plugin.apply(svc);
|
10486 - | self.malformed_timestamp_query_default_custom(svc)
|
11700 + | self.malformed_timestamp_query_http_date_custom(svc)
|
10487 11701 | }
|
10488 11702 |
|
10489 - | /// Sets the [`MalformedTimestampQueryDefault`](crate::operation_shape::MalformedTimestampQueryDefault) to a custom [`Service`](tower::Service).
|
11703 + | /// Sets the [`MalformedTimestampQueryHttpDate`](crate::operation_shape::MalformedTimestampQueryHttpDate) to a custom [`Service`](tower::Service).
|
10490 11704 | /// not constrained by the Smithy contract.
|
10491 - | fn malformed_timestamp_query_default_custom<S>(mut self, svc: S) -> Self
|
11705 + | fn malformed_timestamp_query_http_date_custom<S>(mut self, svc: S) -> Self
|
10492 11706 | where
|
10493 11707 | S: ::tower::Service<
|
10494 11708 | ::http_1x::Request<Body>,
|
10495 11709 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
10496 11710 | Error = ::std::convert::Infallible,
|
10497 11711 | > + Clone
|
10498 11712 | + Send
|
10499 11713 | + 'static,
|
10500 11714 | S::Future: Send + 'static,
|
10501 11715 | {
|
10502 - | self.malformed_timestamp_query_default =
|
11716 + | self.malformed_timestamp_query_http_date =
|
10503 11717 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
10504 11718 | self
|
10505 11719 | }
|
10506 11720 |
|
10507 - | /// Sets the [`MalformedTimestampQueryEpoch`](crate::operation_shape::MalformedTimestampQueryEpoch) operation.
|
11721 + | /// Sets the [`MalformedUnion`](crate::operation_shape::MalformedUnion) operation.
|
10508 11722 | ///
|
10509 11723 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
10510 11724 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
10511 11725 | ///
|
10512 11726 | /// # Example
|
10513 11727 | ///
|
10514 11728 | /// ```no_run
|
10515 11729 | /// use rest_json::{RestJson, RestJsonConfig};
|
10516 11730 | ///
|
10517 11731 | /// use rest_json::{input, output, error};
|
10518 11732 | ///
|
10519 - | /// async fn handler(input: input::MalformedTimestampQueryEpochInput) -> Result<output::MalformedTimestampQueryEpochOutput, error::MalformedTimestampQueryEpochError> {
|
11733 + | /// async fn handler(input: input::MalformedUnionInput) -> output::MalformedUnionOutput {
|
10520 11734 | /// todo!()
|
10521 11735 | /// }
|
10522 11736 | ///
|
10523 11737 | /// let config = RestJsonConfig::builder().build();
|
10524 11738 | /// let app = RestJson::builder(config)
|
10525 - | /// .malformed_timestamp_query_epoch(handler)
|
11739 + | /// .malformed_union(handler)
|
10526 11740 | /// /* Set other handlers */
|
10527 11741 | /// .build()
|
10528 11742 | /// .unwrap();
|
10529 11743 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10530 11744 | /// ```
|
10531 11745 | ///
|
10532 - | pub fn malformed_timestamp_query_epoch<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11746 + | pub fn malformed_union<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10533 11747 | where
|
10534 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampQueryEpoch, HandlerExtractors>,
|
11748 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedUnion, HandlerExtractors>,
|
10535 11749 |
|
10536 11750 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
10537 11751 | RestJson<L>,
|
10538 - | crate::operation_shape::MalformedTimestampQueryEpoch,
|
10539 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampQueryEpoch, HandlerType>
|
11752 + | crate::operation_shape::MalformedUnion,
|
11753 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedUnion, HandlerType>
|
10540 11754 | >,
|
10541 11755 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
10542 11756 | RestJson<L>,
|
10543 - | crate::operation_shape::MalformedTimestampQueryEpoch,
|
11757 + | crate::operation_shape::MalformedUnion,
|
10544 11758 | ModelPl::Output
|
10545 11759 | >,
|
10546 11760 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
10547 11761 | RestJson<L>,
|
10548 - | crate::operation_shape::MalformedTimestampQueryEpoch,
|
11762 + | crate::operation_shape::MalformedUnion,
|
10549 11763 | <
|
10550 11764 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10551 11765 | as ::aws_smithy_http_server::plugin::Plugin<
|
10552 11766 | RestJson<L>,
|
10553 - | crate::operation_shape::MalformedTimestampQueryEpoch,
|
11767 + | crate::operation_shape::MalformedUnion,
|
10554 11768 | ModelPl::Output
|
10555 11769 | >
|
10556 11770 | >::Output
|
10557 11771 | >,
|
10558 11772 |
|
10559 11773 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10560 11774 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
10561 11775 |
|
10562 11776 | {
|
10563 11777 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
10564 11778 | use ::aws_smithy_http_server::plugin::Plugin;
|
10565 - | let svc = crate::operation_shape::MalformedTimestampQueryEpoch::from_handler(handler);
|
11779 + | let svc = crate::operation_shape::MalformedUnion::from_handler(handler);
|
10566 11780 | let svc = self.model_plugin.apply(svc);
|
10567 11781 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10568 11782 | .apply(svc);
|
10569 11783 | let svc = self.http_plugin.apply(svc);
|
10570 - | self.malformed_timestamp_query_epoch_custom(svc)
|
11784 + | self.malformed_union_custom(svc)
|
10571 11785 | }
|
10572 11786 |
|
10573 - | /// Sets the [`MalformedTimestampQueryEpoch`](crate::operation_shape::MalformedTimestampQueryEpoch) operation.
|
11787 + | /// Sets the [`MalformedUnion`](crate::operation_shape::MalformedUnion) operation.
|
10574 11788 | ///
|
10575 11789 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
10576 11790 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
10577 11791 | ///
|
10578 11792 | /// # Example
|
10579 11793 | ///
|
10580 11794 | /// ```no_run
|
10581 11795 | /// use rest_json::{RestJson, RestJsonConfig};
|
10582 11796 | ///
|
10583 11797 | /// use rest_json::{input, output, error};
|
10584 11798 | ///
|
10585 - | /// async fn handler(input: input::MalformedTimestampQueryEpochInput) -> Result<output::MalformedTimestampQueryEpochOutput, error::MalformedTimestampQueryEpochError> {
|
11799 + | /// async fn handler(input: input::MalformedUnionInput) -> Result<output::MalformedUnionOutput, std::convert::Infallible> {
|
10586 11800 | /// todo!()
|
10587 11801 | /// }
|
10588 11802 | ///
|
10589 11803 | /// let config = RestJsonConfig::builder().build();
|
10590 11804 | /// let svc = ::tower::util::service_fn(handler);
|
10591 11805 | /// let app = RestJson::builder(config)
|
10592 - | /// .malformed_timestamp_query_epoch_service(svc)
|
11806 + | /// .malformed_union_service(svc)
|
10593 11807 | /// /* Set other handlers */
|
10594 11808 | /// .build()
|
10595 11809 | /// .unwrap();
|
10596 11810 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10597 11811 | /// ```
|
10598 11812 | ///
|
10599 - | pub fn malformed_timestamp_query_epoch_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11813 + | pub fn malformed_union_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10600 11814 | where
|
10601 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampQueryEpoch, ServiceExtractors>,
|
11815 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedUnion, ServiceExtractors>,
|
10602 11816 |
|
10603 11817 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
10604 11818 | RestJson<L>,
|
10605 - | crate::operation_shape::MalformedTimestampQueryEpoch,
|
10606 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampQueryEpoch, S>
|
11819 + | crate::operation_shape::MalformedUnion,
|
11820 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedUnion, S>
|
10607 11821 | >,
|
10608 11822 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
10609 11823 | RestJson<L>,
|
10610 - | crate::operation_shape::MalformedTimestampQueryEpoch,
|
11824 + | crate::operation_shape::MalformedUnion,
|
10611 11825 | ModelPl::Output
|
10612 11826 | >,
|
10613 11827 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
10614 11828 | RestJson<L>,
|
10615 - | crate::operation_shape::MalformedTimestampQueryEpoch,
|
11829 + | crate::operation_shape::MalformedUnion,
|
10616 11830 | <
|
10617 11831 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10618 11832 | as ::aws_smithy_http_server::plugin::Plugin<
|
10619 11833 | RestJson<L>,
|
10620 - | crate::operation_shape::MalformedTimestampQueryEpoch,
|
11834 + | crate::operation_shape::MalformedUnion,
|
10621 11835 | ModelPl::Output
|
10622 11836 | >
|
10623 11837 | >::Output
|
10624 11838 | >,
|
10625 11839 |
|
10626 11840 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10627 11841 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
10628 11842 |
|
10629 11843 | {
|
10630 11844 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
10631 11845 | use ::aws_smithy_http_server::plugin::Plugin;
|
10632 - | let svc = crate::operation_shape::MalformedTimestampQueryEpoch::from_service(service);
|
11846 + | let svc = crate::operation_shape::MalformedUnion::from_service(service);
|
10633 11847 | let svc = self.model_plugin.apply(svc);
|
10634 11848 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10635 11849 | .apply(svc);
|
10636 11850 | let svc = self.http_plugin.apply(svc);
|
10637 - | self.malformed_timestamp_query_epoch_custom(svc)
|
11851 + | self.malformed_union_custom(svc)
|
10638 11852 | }
|
10639 11853 |
|
10640 - | /// Sets the [`MalformedTimestampQueryEpoch`](crate::operation_shape::MalformedTimestampQueryEpoch) to a custom [`Service`](tower::Service).
|
11854 + | /// Sets the [`MalformedUnion`](crate::operation_shape::MalformedUnion) to a custom [`Service`](tower::Service).
|
10641 11855 | /// not constrained by the Smithy contract.
|
10642 - | fn malformed_timestamp_query_epoch_custom<S>(mut self, svc: S) -> Self
|
11856 + | fn malformed_union_custom<S>(mut self, svc: S) -> Self
|
10643 11857 | where
|
10644 11858 | S: ::tower::Service<
|
10645 11859 | ::http_1x::Request<Body>,
|
10646 11860 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
10647 11861 | Error = ::std::convert::Infallible,
|
10648 11862 | > + Clone
|
10649 11863 | + Send
|
10650 11864 | + 'static,
|
10651 11865 | S::Future: Send + 'static,
|
10652 11866 | {
|
10653 - | self.malformed_timestamp_query_epoch =
|
10654 - | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
11867 + | self.malformed_union = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
10655 11868 | self
|
10656 11869 | }
|
10657 11870 |
|
10658 - | /// Sets the [`MalformedTimestampQueryHttpDate`](crate::operation_shape::MalformedTimestampQueryHttpDate) operation.
|
11871 + | /// Sets the [`MediaTypeHeader`](crate::operation_shape::MediaTypeHeader) operation.
|
10659 11872 | ///
|
10660 11873 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
10661 11874 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
10662 11875 | ///
|
10663 11876 | /// # Example
|
10664 11877 | ///
|
10665 11878 | /// ```no_run
|
10666 11879 | /// use rest_json::{RestJson, RestJsonConfig};
|
10667 11880 | ///
|
10668 11881 | /// use rest_json::{input, output, error};
|
10669 11882 | ///
|
10670 - | /// async fn handler(input: input::MalformedTimestampQueryHttpDateInput) -> Result<output::MalformedTimestampQueryHttpDateOutput, error::MalformedTimestampQueryHttpDateError> {
|
11883 + | /// async fn handler(input: input::MediaTypeHeaderInput) -> output::MediaTypeHeaderOutput {
|
10671 11884 | /// todo!()
|
10672 11885 | /// }
|
10673 11886 | ///
|
10674 11887 | /// let config = RestJsonConfig::builder().build();
|
10675 11888 | /// let app = RestJson::builder(config)
|
10676 - | /// .malformed_timestamp_query_http_date(handler)
|
11889 + | /// .media_type_header(handler)
|
10677 11890 | /// /* Set other handlers */
|
10678 11891 | /// .build()
|
10679 11892 | /// .unwrap();
|
10680 11893 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10681 11894 | /// ```
|
10682 11895 | ///
|
10683 - | pub fn malformed_timestamp_query_http_date<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11896 + | pub fn media_type_header<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10684 11897 | where
|
10685 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedTimestampQueryHttpDate, HandlerExtractors>,
|
11898 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MediaTypeHeader, HandlerExtractors>,
|
10686 11899 |
|
10687 11900 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
10688 11901 | RestJson<L>,
|
10689 - | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
10690 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedTimestampQueryHttpDate, HandlerType>
|
11902 + | crate::operation_shape::MediaTypeHeader,
|
11903 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MediaTypeHeader, HandlerType>
|
10691 11904 | >,
|
10692 11905 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
10693 11906 | RestJson<L>,
|
10694 - | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
11907 + | crate::operation_shape::MediaTypeHeader,
|
10695 11908 | ModelPl::Output
|
10696 11909 | >,
|
10697 11910 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
10698 11911 | RestJson<L>,
|
10699 - | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
11912 + | crate::operation_shape::MediaTypeHeader,
|
10700 11913 | <
|
10701 11914 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10702 11915 | as ::aws_smithy_http_server::plugin::Plugin<
|
10703 11916 | RestJson<L>,
|
10704 - | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
11917 + | crate::operation_shape::MediaTypeHeader,
|
10705 11918 | ModelPl::Output
|
10706 11919 | >
|
10707 11920 | >::Output
|
10708 11921 | >,
|
10709 11922 |
|
10710 11923 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10711 11924 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
10712 11925 |
|
10713 11926 | {
|
10714 11927 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
10715 11928 | use ::aws_smithy_http_server::plugin::Plugin;
|
10716 - | let svc = crate::operation_shape::MalformedTimestampQueryHttpDate::from_handler(handler);
|
11929 + | let svc = crate::operation_shape::MediaTypeHeader::from_handler(handler);
|
10717 11930 | let svc = self.model_plugin.apply(svc);
|
10718 11931 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10719 11932 | .apply(svc);
|
10720 11933 | let svc = self.http_plugin.apply(svc);
|
10721 - | self.malformed_timestamp_query_http_date_custom(svc)
|
11934 + | self.media_type_header_custom(svc)
|
10722 11935 | }
|
10723 11936 |
|
10724 - | /// Sets the [`MalformedTimestampQueryHttpDate`](crate::operation_shape::MalformedTimestampQueryHttpDate) operation.
|
11937 + | /// Sets the [`MediaTypeHeader`](crate::operation_shape::MediaTypeHeader) operation.
|
10725 11938 | ///
|
10726 11939 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
10727 11940 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
10728 11941 | ///
|
10729 11942 | /// # Example
|
10730 11943 | ///
|
10731 11944 | /// ```no_run
|
10732 11945 | /// use rest_json::{RestJson, RestJsonConfig};
|
10733 11946 | ///
|
10734 11947 | /// use rest_json::{input, output, error};
|
10735 11948 | ///
|
10736 - | /// async fn handler(input: input::MalformedTimestampQueryHttpDateInput) -> Result<output::MalformedTimestampQueryHttpDateOutput, error::MalformedTimestampQueryHttpDateError> {
|
11949 + | /// async fn handler(input: input::MediaTypeHeaderInput) -> Result<output::MediaTypeHeaderOutput, std::convert::Infallible> {
|
10737 11950 | /// todo!()
|
10738 11951 | /// }
|
10739 11952 | ///
|
10740 11953 | /// let config = RestJsonConfig::builder().build();
|
10741 11954 | /// let svc = ::tower::util::service_fn(handler);
|
10742 11955 | /// let app = RestJson::builder(config)
|
10743 - | /// .malformed_timestamp_query_http_date_service(svc)
|
11956 + | /// .media_type_header_service(svc)
|
10744 11957 | /// /* Set other handlers */
|
10745 11958 | /// .build()
|
10746 11959 | /// .unwrap();
|
10747 11960 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10748 11961 | /// ```
|
10749 11962 | ///
|
10750 - | pub fn malformed_timestamp_query_http_date_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11963 + | pub fn media_type_header_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10751 11964 | where
|
10752 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedTimestampQueryHttpDate, ServiceExtractors>,
|
11965 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MediaTypeHeader, ServiceExtractors>,
|
10753 11966 |
|
10754 11967 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
10755 11968 | RestJson<L>,
|
10756 - | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
10757 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedTimestampQueryHttpDate, S>
|
11969 + | crate::operation_shape::MediaTypeHeader,
|
11970 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MediaTypeHeader, S>
|
10758 11971 | >,
|
10759 11972 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
10760 11973 | RestJson<L>,
|
10761 - | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
11974 + | crate::operation_shape::MediaTypeHeader,
|
10762 11975 | ModelPl::Output
|
10763 11976 | >,
|
10764 11977 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
10765 11978 | RestJson<L>,
|
10766 - | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
11979 + | crate::operation_shape::MediaTypeHeader,
|
10767 11980 | <
|
10768 11981 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10769 11982 | as ::aws_smithy_http_server::plugin::Plugin<
|
10770 11983 | RestJson<L>,
|
10771 - | crate::operation_shape::MalformedTimestampQueryHttpDate,
|
11984 + | crate::operation_shape::MediaTypeHeader,
|
10772 11985 | ModelPl::Output
|
10773 11986 | >
|
10774 11987 | >::Output
|
10775 11988 | >,
|
10776 11989 |
|
10777 11990 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10778 11991 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
10779 11992 |
|
10780 11993 | {
|
10781 11994 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
10782 11995 | use ::aws_smithy_http_server::plugin::Plugin;
|
10783 - | let svc = crate::operation_shape::MalformedTimestampQueryHttpDate::from_service(service);
|
11996 + | let svc = crate::operation_shape::MediaTypeHeader::from_service(service);
|
10784 11997 | let svc = self.model_plugin.apply(svc);
|
10785 11998 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10786 11999 | .apply(svc);
|
10787 12000 | let svc = self.http_plugin.apply(svc);
|
10788 - | self.malformed_timestamp_query_http_date_custom(svc)
|
12001 + | self.media_type_header_custom(svc)
|
10789 12002 | }
|
10790 12003 |
|
10791 - | /// Sets the [`MalformedTimestampQueryHttpDate`](crate::operation_shape::MalformedTimestampQueryHttpDate) to a custom [`Service`](tower::Service).
|
12004 + | /// Sets the [`MediaTypeHeader`](crate::operation_shape::MediaTypeHeader) to a custom [`Service`](tower::Service).
|
10792 12005 | /// not constrained by the Smithy contract.
|
10793 - | fn malformed_timestamp_query_http_date_custom<S>(mut self, svc: S) -> Self
|
12006 + | fn media_type_header_custom<S>(mut self, svc: S) -> Self
|
10794 12007 | where
|
10795 12008 | S: ::tower::Service<
|
10796 12009 | ::http_1x::Request<Body>,
|
10797 12010 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
10798 12011 | Error = ::std::convert::Infallible,
|
10799 12012 | > + Clone
|
10800 12013 | + Send
|
10801 12014 | + 'static,
|
10802 12015 | S::Future: Send + 'static,
|
10803 12016 | {
|
10804 - | self.malformed_timestamp_query_http_date =
|
10805 - | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
12017 + | self.media_type_header = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
10806 12018 | self
|
10807 12019 | }
|
10808 12020 |
|
10809 - | /// Sets the [`MalformedUnion`](crate::operation_shape::MalformedUnion) operation.
|
12021 + | /// Sets the [`NoInputAndNoOutput`](crate::operation_shape::NoInputAndNoOutput) operation.
|
10810 12022 | ///
|
10811 12023 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
10812 12024 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
10813 12025 | ///
|
10814 12026 | /// # Example
|
10815 12027 | ///
|
10816 12028 | /// ```no_run
|
10817 12029 | /// use rest_json::{RestJson, RestJsonConfig};
|
10818 12030 | ///
|
10819 12031 | /// use rest_json::{input, output, error};
|
10820 12032 | ///
|
10821 - | /// async fn handler(input: input::MalformedUnionInput) -> output::MalformedUnionOutput {
|
12033 + | /// async fn handler(input: input::NoInputAndNoOutputInput) -> output::NoInputAndNoOutputOutput {
|
10822 12034 | /// todo!()
|
10823 12035 | /// }
|
10824 12036 | ///
|
10825 12037 | /// let config = RestJsonConfig::builder().build();
|
10826 12038 | /// let app = RestJson::builder(config)
|
10827 - | /// .malformed_union(handler)
|
12039 + | /// .no_input_and_no_output(handler)
|
10828 12040 | /// /* Set other handlers */
|
10829 12041 | /// .build()
|
10830 12042 | /// .unwrap();
|
10831 12043 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10832 12044 | /// ```
|
10833 12045 | ///
|
10834 - | pub fn malformed_union<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12046 + | pub fn no_input_and_no_output<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10835 12047 | where
|
10836 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MalformedUnion, HandlerExtractors>,
|
12048 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::NoInputAndNoOutput, HandlerExtractors>,
|
10837 12049 |
|
10838 12050 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
10839 12051 | RestJson<L>,
|
10840 - | crate::operation_shape::MalformedUnion,
|
10841 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MalformedUnion, HandlerType>
|
12052 + | crate::operation_shape::NoInputAndNoOutput,
|
12053 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::NoInputAndNoOutput, HandlerType>
|
10842 12054 | >,
|
10843 12055 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
10844 12056 | RestJson<L>,
|
10845 - | crate::operation_shape::MalformedUnion,
|
12057 + | crate::operation_shape::NoInputAndNoOutput,
|
10846 12058 | ModelPl::Output
|
10847 12059 | >,
|
10848 12060 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
10849 12061 | RestJson<L>,
|
10850 - | crate::operation_shape::MalformedUnion,
|
12062 + | crate::operation_shape::NoInputAndNoOutput,
|
10851 12063 | <
|
10852 12064 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10853 12065 | as ::aws_smithy_http_server::plugin::Plugin<
|
10854 12066 | RestJson<L>,
|
10855 - | crate::operation_shape::MalformedUnion,
|
12067 + | crate::operation_shape::NoInputAndNoOutput,
|
10856 12068 | ModelPl::Output
|
10857 12069 | >
|
10858 12070 | >::Output
|
10859 12071 | >,
|
10860 12072 |
|
10861 12073 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10862 12074 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
10863 12075 |
|
10864 12076 | {
|
10865 12077 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
10866 12078 | use ::aws_smithy_http_server::plugin::Plugin;
|
10867 - | let svc = crate::operation_shape::MalformedUnion::from_handler(handler);
|
12079 + | let svc = crate::operation_shape::NoInputAndNoOutput::from_handler(handler);
|
10868 12080 | let svc = self.model_plugin.apply(svc);
|
10869 12081 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10870 12082 | .apply(svc);
|
10871 12083 | let svc = self.http_plugin.apply(svc);
|
10872 - | self.malformed_union_custom(svc)
|
12084 + | self.no_input_and_no_output_custom(svc)
|
10873 12085 | }
|
10874 12086 |
|
10875 - | /// Sets the [`MalformedUnion`](crate::operation_shape::MalformedUnion) operation.
|
12087 + | /// Sets the [`NoInputAndNoOutput`](crate::operation_shape::NoInputAndNoOutput) operation.
|
10876 12088 | ///
|
10877 12089 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
10878 12090 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
10879 12091 | ///
|
10880 12092 | /// # Example
|
10881 12093 | ///
|
10882 12094 | /// ```no_run
|
10883 12095 | /// use rest_json::{RestJson, RestJsonConfig};
|
10884 12096 | ///
|
10885 12097 | /// use rest_json::{input, output, error};
|
10886 12098 | ///
|
10887 - | /// async fn handler(input: input::MalformedUnionInput) -> Result<output::MalformedUnionOutput, std::convert::Infallible> {
|
12099 + | /// async fn handler(input: input::NoInputAndNoOutputInput) -> Result<output::NoInputAndNoOutputOutput, std::convert::Infallible> {
|
10888 12100 | /// todo!()
|
10889 12101 | /// }
|
10890 12102 | ///
|
10891 12103 | /// let config = RestJsonConfig::builder().build();
|
10892 12104 | /// let svc = ::tower::util::service_fn(handler);
|
10893 12105 | /// let app = RestJson::builder(config)
|
10894 - | /// .malformed_union_service(svc)
|
12106 + | /// .no_input_and_no_output_service(svc)
|
10895 12107 | /// /* Set other handlers */
|
10896 12108 | /// .build()
|
10897 12109 | /// .unwrap();
|
10898 12110 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10899 12111 | /// ```
|
10900 12112 | ///
|
10901 - | pub fn malformed_union_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12113 + | pub fn no_input_and_no_output_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
10902 12114 | where
|
10903 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MalformedUnion, ServiceExtractors>,
|
12115 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::NoInputAndNoOutput, ServiceExtractors>,
|
10904 12116 |
|
10905 12117 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
10906 12118 | RestJson<L>,
|
10907 - | crate::operation_shape::MalformedUnion,
|
10908 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MalformedUnion, S>
|
12119 + | crate::operation_shape::NoInputAndNoOutput,
|
12120 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::NoInputAndNoOutput, S>
|
10909 12121 | >,
|
10910 12122 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
10911 12123 | RestJson<L>,
|
10912 - | crate::operation_shape::MalformedUnion,
|
12124 + | crate::operation_shape::NoInputAndNoOutput,
|
10913 12125 | ModelPl::Output
|
10914 12126 | >,
|
10915 12127 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
10916 12128 | RestJson<L>,
|
10917 - | crate::operation_shape::MalformedUnion,
|
12129 + | crate::operation_shape::NoInputAndNoOutput,
|
10918 12130 | <
|
10919 12131 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
10920 12132 | as ::aws_smithy_http_server::plugin::Plugin<
|
10921 12133 | RestJson<L>,
|
10922 - | crate::operation_shape::MalformedUnion,
|
12134 + | crate::operation_shape::NoInputAndNoOutput,
|
10923 12135 | ModelPl::Output
|
10924 12136 | >
|
10925 12137 | >::Output
|
10926 12138 | >,
|
10927 12139 |
|
10928 12140 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
10929 12141 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
10930 12142 |
|
10931 12143 | {
|
10932 12144 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
10933 12145 | use ::aws_smithy_http_server::plugin::Plugin;
|
10934 - | let svc = crate::operation_shape::MalformedUnion::from_service(service);
|
12146 + | let svc = crate::operation_shape::NoInputAndNoOutput::from_service(service);
|
10935 12147 | let svc = self.model_plugin.apply(svc);
|
10936 12148 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
10937 12149 | .apply(svc);
|
10938 12150 | let svc = self.http_plugin.apply(svc);
|
10939 - | self.malformed_union_custom(svc)
|
12151 + | self.no_input_and_no_output_custom(svc)
|
10940 12152 | }
|
10941 12153 |
|
10942 - | /// Sets the [`MalformedUnion`](crate::operation_shape::MalformedUnion) to a custom [`Service`](tower::Service).
|
12154 + | /// Sets the [`NoInputAndNoOutput`](crate::operation_shape::NoInputAndNoOutput) to a custom [`Service`](tower::Service).
|
10943 12155 | /// not constrained by the Smithy contract.
|
10944 - | fn malformed_union_custom<S>(mut self, svc: S) -> Self
|
12156 + | fn no_input_and_no_output_custom<S>(mut self, svc: S) -> Self
|
10945 12157 | where
|
10946 12158 | S: ::tower::Service<
|
10947 12159 | ::http_1x::Request<Body>,
|
10948 12160 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
10949 12161 | Error = ::std::convert::Infallible,
|
10950 12162 | > + Clone
|
10951 12163 | + Send
|
10952 12164 | + 'static,
|
10953 12165 | S::Future: Send + 'static,
|
10954 12166 | {
|
10955 - | self.malformed_union = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
12167 + | self.no_input_and_no_output = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
10956 12168 | self
|
10957 12169 | }
|
10958 12170 |
|
10959 - | /// Sets the [`MediaTypeHeader`](crate::operation_shape::MediaTypeHeader) operation.
|
12171 + | /// Sets the [`NoInputAndOutput`](crate::operation_shape::NoInputAndOutput) operation.
|
10960 12172 | ///
|
10961 12173 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
10962 12174 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
10963 12175 | ///
|
10964 12176 | /// # Example
|
10965 12177 | ///
|
10966 12178 | /// ```no_run
|
10967 12179 | /// use rest_json::{RestJson, RestJsonConfig};
|
10968 12180 | ///
|
10969 12181 | /// use rest_json::{input, output, error};
|
10970 12182 | ///
|
10971 - | /// async fn handler(input: input::MediaTypeHeaderInput) -> output::MediaTypeHeaderOutput {
|
12183 + | /// async fn handler(input: input::NoInputAndOutputInput) -> output::NoInputAndOutputOutput {
|
10972 12184 | /// todo!()
|
10973 12185 | /// }
|
10974 12186 | ///
|
10975 12187 | /// let config = RestJsonConfig::builder().build();
|
10976 12188 | /// let app = RestJson::builder(config)
|
10977 - | /// .media_type_header(handler)
|
12189 + | /// .no_input_and_output(handler)
|
10978 12190 | /// /* Set other handlers */
|
10979 12191 | /// .build()
|
10980 12192 | /// .unwrap();
|
10981 12193 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
10982 12194 | /// ```
|
10983 12195 | ///
|
10984 - | pub fn media_type_header<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12196 + | pub fn no_input_and_output<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
10985 12197 | where
|
10986 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::MediaTypeHeader, HandlerExtractors>,
|
12198 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::NoInputAndOutput, HandlerExtractors>,
|
10987 12199 |
|
10988 12200 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
10989 12201 | RestJson<L>,
|
10990 - | crate::operation_shape::MediaTypeHeader,
|
10991 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::MediaTypeHeader, HandlerType>
|
12202 + | crate::operation_shape::NoInputAndOutput,
|
12203 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::NoInputAndOutput, HandlerType>
|
10992 12204 | >,
|
10993 12205 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
10994 12206 | RestJson<L>,
|
10995 - | crate::operation_shape::MediaTypeHeader,
|
12207 + | crate::operation_shape::NoInputAndOutput,
|
10996 12208 | ModelPl::Output
|
10997 12209 | >,
|
10998 12210 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
10999 12211 | RestJson<L>,
|
11000 - | crate::operation_shape::MediaTypeHeader,
|
12212 + | crate::operation_shape::NoInputAndOutput,
|
11001 12213 | <
|
11002 12214 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11003 12215 | as ::aws_smithy_http_server::plugin::Plugin<
|
11004 12216 | RestJson<L>,
|
11005 - | crate::operation_shape::MediaTypeHeader,
|
12217 + | crate::operation_shape::NoInputAndOutput,
|
11006 12218 | ModelPl::Output
|
11007 12219 | >
|
11008 12220 | >::Output
|
11009 12221 | >,
|
11010 12222 |
|
11011 12223 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11012 12224 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
11013 12225 |
|
11014 12226 | {
|
11015 12227 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11016 12228 | use ::aws_smithy_http_server::plugin::Plugin;
|
11017 - | let svc = crate::operation_shape::MediaTypeHeader::from_handler(handler);
|
12229 + | let svc = crate::operation_shape::NoInputAndOutput::from_handler(handler);
|
11018 12230 | let svc = self.model_plugin.apply(svc);
|
11019 12231 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11020 12232 | .apply(svc);
|
11021 12233 | let svc = self.http_plugin.apply(svc);
|
11022 - | self.media_type_header_custom(svc)
|
12234 + | self.no_input_and_output_custom(svc)
|
11023 12235 | }
|
11024 12236 |
|
11025 - | /// Sets the [`MediaTypeHeader`](crate::operation_shape::MediaTypeHeader) operation.
|
12237 + | /// Sets the [`NoInputAndOutput`](crate::operation_shape::NoInputAndOutput) operation.
|
11026 12238 | ///
|
11027 12239 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11028 12240 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11029 12241 | ///
|
11030 12242 | /// # Example
|
11031 12243 | ///
|
11032 12244 | /// ```no_run
|
11033 12245 | /// use rest_json::{RestJson, RestJsonConfig};
|
11034 12246 | ///
|
11035 12247 | /// use rest_json::{input, output, error};
|
11036 12248 | ///
|
11037 - | /// async fn handler(input: input::MediaTypeHeaderInput) -> Result<output::MediaTypeHeaderOutput, std::convert::Infallible> {
|
12249 + | /// async fn handler(input: input::NoInputAndOutputInput) -> Result<output::NoInputAndOutputOutput, std::convert::Infallible> {
|
11038 12250 | /// todo!()
|
11039 12251 | /// }
|
11040 12252 | ///
|
11041 12253 | /// let config = RestJsonConfig::builder().build();
|
11042 12254 | /// let svc = ::tower::util::service_fn(handler);
|
11043 12255 | /// let app = RestJson::builder(config)
|
11044 - | /// .media_type_header_service(svc)
|
12256 + | /// .no_input_and_output_service(svc)
|
11045 12257 | /// /* Set other handlers */
|
11046 12258 | /// .build()
|
11047 12259 | /// .unwrap();
|
11048 12260 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11049 12261 | /// ```
|
11050 12262 | ///
|
11051 - | pub fn media_type_header_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12263 + | pub fn no_input_and_output_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11052 12264 | where
|
11053 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::MediaTypeHeader, ServiceExtractors>,
|
12265 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::NoInputAndOutput, ServiceExtractors>,
|
11054 12266 |
|
11055 12267 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11056 12268 | RestJson<L>,
|
11057 - | crate::operation_shape::MediaTypeHeader,
|
11058 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::MediaTypeHeader, S>
|
12269 + | crate::operation_shape::NoInputAndOutput,
|
12270 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::NoInputAndOutput, S>
|
11059 12271 | >,
|
11060 12272 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11061 12273 | RestJson<L>,
|
11062 - | crate::operation_shape::MediaTypeHeader,
|
12274 + | crate::operation_shape::NoInputAndOutput,
|
11063 12275 | ModelPl::Output
|
11064 12276 | >,
|
11065 12277 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11066 12278 | RestJson<L>,
|
11067 - | crate::operation_shape::MediaTypeHeader,
|
12279 + | crate::operation_shape::NoInputAndOutput,
|
11068 12280 | <
|
11069 12281 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11070 12282 | as ::aws_smithy_http_server::plugin::Plugin<
|
11071 12283 | RestJson<L>,
|
11072 - | crate::operation_shape::MediaTypeHeader,
|
12284 + | crate::operation_shape::NoInputAndOutput,
|
11073 12285 | ModelPl::Output
|
11074 12286 | >
|
11075 12287 | >::Output
|
11076 12288 | >,
|
11077 12289 |
|
11078 12290 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11079 12291 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
11080 12292 |
|
11081 12293 | {
|
11082 12294 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11083 12295 | use ::aws_smithy_http_server::plugin::Plugin;
|
11084 - | let svc = crate::operation_shape::MediaTypeHeader::from_service(service);
|
12296 + | let svc = crate::operation_shape::NoInputAndOutput::from_service(service);
|
11085 12297 | let svc = self.model_plugin.apply(svc);
|
11086 12298 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11087 12299 | .apply(svc);
|
11088 12300 | let svc = self.http_plugin.apply(svc);
|
11089 - | self.media_type_header_custom(svc)
|
12301 + | self.no_input_and_output_custom(svc)
|
11090 12302 | }
|
11091 12303 |
|
11092 - | /// Sets the [`MediaTypeHeader`](crate::operation_shape::MediaTypeHeader) to a custom [`Service`](tower::Service).
|
12304 + | /// Sets the [`NoInputAndOutput`](crate::operation_shape::NoInputAndOutput) to a custom [`Service`](tower::Service).
|
11093 12305 | /// not constrained by the Smithy contract.
|
11094 - | fn media_type_header_custom<S>(mut self, svc: S) -> Self
|
12306 + | fn no_input_and_output_custom<S>(mut self, svc: S) -> Self
|
11095 12307 | where
|
11096 12308 | S: ::tower::Service<
|
11097 12309 | ::http_1x::Request<Body>,
|
11098 12310 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
11099 12311 | Error = ::std::convert::Infallible,
|
11100 12312 | > + Clone
|
11101 12313 | + Send
|
11102 12314 | + 'static,
|
11103 12315 | S::Future: Send + 'static,
|
11104 12316 | {
|
11105 - | self.media_type_header = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
12317 + | self.no_input_and_output = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
11106 12318 | self
|
11107 12319 | }
|
11108 12320 |
|
11109 - | /// Sets the [`NoInputAndNoOutput`](crate::operation_shape::NoInputAndNoOutput) operation.
|
12321 + | /// Sets the [`NullAndEmptyHeadersClient`](crate::operation_shape::NullAndEmptyHeadersClient) operation.
|
11110 12322 | ///
|
11111 12323 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11112 12324 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11113 12325 | ///
|
11114 12326 | /// # Example
|
11115 12327 | ///
|
11116 12328 | /// ```no_run
|
11117 12329 | /// use rest_json::{RestJson, RestJsonConfig};
|
11118 12330 | ///
|
11119 12331 | /// use rest_json::{input, output, error};
|
11120 12332 | ///
|
11121 - | /// async fn handler(input: input::NoInputAndNoOutputInput) -> output::NoInputAndNoOutputOutput {
|
12333 + | /// async fn handler(input: input::NullAndEmptyHeadersClientInput) -> output::NullAndEmptyHeadersClientOutput {
|
11122 12334 | /// todo!()
|
11123 12335 | /// }
|
11124 12336 | ///
|
11125 12337 | /// let config = RestJsonConfig::builder().build();
|
11126 12338 | /// let app = RestJson::builder(config)
|
11127 - | /// .no_input_and_no_output(handler)
|
12339 + | /// .null_and_empty_headers_client(handler)
|
11128 12340 | /// /* Set other handlers */
|
11129 12341 | /// .build()
|
11130 12342 | /// .unwrap();
|
11131 12343 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11132 12344 | /// ```
|
11133 12345 | ///
|
11134 - | pub fn no_input_and_no_output<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12346 + | pub fn null_and_empty_headers_client<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11135 12347 | where
|
11136 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::NoInputAndNoOutput, HandlerExtractors>,
|
12348 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::NullAndEmptyHeadersClient, HandlerExtractors>,
|
11137 12349 |
|
11138 12350 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11139 12351 | RestJson<L>,
|
11140 - | crate::operation_shape::NoInputAndNoOutput,
|
11141 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::NoInputAndNoOutput, HandlerType>
|
12352 + | crate::operation_shape::NullAndEmptyHeadersClient,
|
12353 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::NullAndEmptyHeadersClient, HandlerType>
|
11142 12354 | >,
|
11143 12355 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11144 12356 | RestJson<L>,
|
11145 - | crate::operation_shape::NoInputAndNoOutput,
|
12357 + | crate::operation_shape::NullAndEmptyHeadersClient,
|
11146 12358 | ModelPl::Output
|
11147 12359 | >,
|
11148 12360 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11149 12361 | RestJson<L>,
|
11150 - | crate::operation_shape::NoInputAndNoOutput,
|
12362 + | crate::operation_shape::NullAndEmptyHeadersClient,
|
11151 12363 | <
|
11152 12364 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11153 12365 | as ::aws_smithy_http_server::plugin::Plugin<
|
11154 12366 | RestJson<L>,
|
11155 - | crate::operation_shape::NoInputAndNoOutput,
|
12367 + | crate::operation_shape::NullAndEmptyHeadersClient,
|
11156 12368 | ModelPl::Output
|
11157 12369 | >
|
11158 12370 | >::Output
|
11159 12371 | >,
|
11160 12372 |
|
11161 12373 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11162 12374 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
11163 12375 |
|
11164 12376 | {
|
11165 12377 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11166 12378 | use ::aws_smithy_http_server::plugin::Plugin;
|
11167 - | let svc = crate::operation_shape::NoInputAndNoOutput::from_handler(handler);
|
12379 + | let svc = crate::operation_shape::NullAndEmptyHeadersClient::from_handler(handler);
|
11168 12380 | let svc = self.model_plugin.apply(svc);
|
11169 12381 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11170 12382 | .apply(svc);
|
11171 12383 | let svc = self.http_plugin.apply(svc);
|
11172 - | self.no_input_and_no_output_custom(svc)
|
12384 + | self.null_and_empty_headers_client_custom(svc)
|
11173 12385 | }
|
11174 12386 |
|
11175 - | /// Sets the [`NoInputAndNoOutput`](crate::operation_shape::NoInputAndNoOutput) operation.
|
12387 + | /// Sets the [`NullAndEmptyHeadersClient`](crate::operation_shape::NullAndEmptyHeadersClient) operation.
|
11176 12388 | ///
|
11177 12389 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11178 12390 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11179 12391 | ///
|
11180 12392 | /// # Example
|
11181 12393 | ///
|
11182 12394 | /// ```no_run
|
11183 12395 | /// use rest_json::{RestJson, RestJsonConfig};
|
11184 12396 | ///
|
11185 12397 | /// use rest_json::{input, output, error};
|
11186 12398 | ///
|
11187 - | /// async fn handler(input: input::NoInputAndNoOutputInput) -> Result<output::NoInputAndNoOutputOutput, std::convert::Infallible> {
|
12399 + | /// async fn handler(input: input::NullAndEmptyHeadersClientInput) -> Result<output::NullAndEmptyHeadersClientOutput, std::convert::Infallible> {
|
11188 12400 | /// todo!()
|
11189 12401 | /// }
|
11190 12402 | ///
|
11191 12403 | /// let config = RestJsonConfig::builder().build();
|
11192 12404 | /// let svc = ::tower::util::service_fn(handler);
|
11193 12405 | /// let app = RestJson::builder(config)
|
11194 - | /// .no_input_and_no_output_service(svc)
|
12406 + | /// .null_and_empty_headers_client_service(svc)
|
11195 12407 | /// /* Set other handlers */
|
11196 12408 | /// .build()
|
11197 12409 | /// .unwrap();
|
11198 12410 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11199 12411 | /// ```
|
11200 12412 | ///
|
11201 - | pub fn no_input_and_no_output_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12413 + | pub fn null_and_empty_headers_client_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11202 12414 | where
|
11203 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::NoInputAndNoOutput, ServiceExtractors>,
|
12415 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::NullAndEmptyHeadersClient, ServiceExtractors>,
|
11204 12416 |
|
11205 12417 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11206 12418 | RestJson<L>,
|
11207 - | crate::operation_shape::NoInputAndNoOutput,
|
11208 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::NoInputAndNoOutput, S>
|
12419 + | crate::operation_shape::NullAndEmptyHeadersClient,
|
12420 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::NullAndEmptyHeadersClient, S>
|
11209 12421 | >,
|
11210 12422 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11211 12423 | RestJson<L>,
|
11212 - | crate::operation_shape::NoInputAndNoOutput,
|
12424 + | crate::operation_shape::NullAndEmptyHeadersClient,
|
11213 12425 | ModelPl::Output
|
11214 12426 | >,
|
11215 12427 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11216 12428 | RestJson<L>,
|
11217 - | crate::operation_shape::NoInputAndNoOutput,
|
12429 + | crate::operation_shape::NullAndEmptyHeadersClient,
|
11218 12430 | <
|
11219 12431 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11220 12432 | as ::aws_smithy_http_server::plugin::Plugin<
|
11221 12433 | RestJson<L>,
|
11222 - | crate::operation_shape::NoInputAndNoOutput,
|
12434 + | crate::operation_shape::NullAndEmptyHeadersClient,
|
11223 12435 | ModelPl::Output
|
11224 12436 | >
|
11225 12437 | >::Output
|
11226 12438 | >,
|
11227 12439 |
|
11228 12440 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11229 12441 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
11230 12442 |
|
11231 12443 | {
|
11232 12444 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11233 12445 | use ::aws_smithy_http_server::plugin::Plugin;
|
11234 - | let svc = crate::operation_shape::NoInputAndNoOutput::from_service(service);
|
12446 + | let svc = crate::operation_shape::NullAndEmptyHeadersClient::from_service(service);
|
11235 12447 | let svc = self.model_plugin.apply(svc);
|
11236 12448 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11237 12449 | .apply(svc);
|
11238 12450 | let svc = self.http_plugin.apply(svc);
|
11239 - | self.no_input_and_no_output_custom(svc)
|
12451 + | self.null_and_empty_headers_client_custom(svc)
|
11240 12452 | }
|
11241 12453 |
|
11242 - | /// Sets the [`NoInputAndNoOutput`](crate::operation_shape::NoInputAndNoOutput) to a custom [`Service`](tower::Service).
|
12454 + | /// Sets the [`NullAndEmptyHeadersClient`](crate::operation_shape::NullAndEmptyHeadersClient) to a custom [`Service`](tower::Service).
|
11243 12455 | /// not constrained by the Smithy contract.
|
11244 - | fn no_input_and_no_output_custom<S>(mut self, svc: S) -> Self
|
12456 + | fn null_and_empty_headers_client_custom<S>(mut self, svc: S) -> Self
|
11245 12457 | where
|
11246 12458 | S: ::tower::Service<
|
11247 12459 | ::http_1x::Request<Body>,
|
11248 12460 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
11249 12461 | Error = ::std::convert::Infallible,
|
11250 12462 | > + Clone
|
11251 12463 | + Send
|
11252 12464 | + 'static,
|
11253 12465 | S::Future: Send + 'static,
|
11254 12466 | {
|
11255 - | self.no_input_and_no_output = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
12467 + | self.null_and_empty_headers_client =
|
12468 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
11256 12469 | self
|
11257 12470 | }
|
11258 12471 |
|
11259 - | /// Sets the [`NoInputAndOutput`](crate::operation_shape::NoInputAndOutput) operation.
|
12472 + | /// Sets the [`NullAndEmptyHeadersServer`](crate::operation_shape::NullAndEmptyHeadersServer) operation.
|
11260 12473 | ///
|
11261 12474 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11262 12475 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11263 12476 | ///
|
11264 12477 | /// # Example
|
11265 12478 | ///
|
11266 12479 | /// ```no_run
|
11267 12480 | /// use rest_json::{RestJson, RestJsonConfig};
|
11268 12481 | ///
|
11269 12482 | /// use rest_json::{input, output, error};
|
11270 12483 | ///
|
11271 - | /// async fn handler(input: input::NoInputAndOutputInput) -> output::NoInputAndOutputOutput {
|
12484 + | /// async fn handler(input: input::NullAndEmptyHeadersServerInput) -> output::NullAndEmptyHeadersServerOutput {
|
11272 12485 | /// todo!()
|
11273 12486 | /// }
|
11274 12487 | ///
|
11275 12488 | /// let config = RestJsonConfig::builder().build();
|
11276 12489 | /// let app = RestJson::builder(config)
|
11277 - | /// .no_input_and_output(handler)
|
12490 + | /// .null_and_empty_headers_server(handler)
|
11278 12491 | /// /* Set other handlers */
|
11279 12492 | /// .build()
|
11280 12493 | /// .unwrap();
|
11281 12494 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11282 12495 | /// ```
|
11283 12496 | ///
|
11284 - | pub fn no_input_and_output<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12497 + | pub fn null_and_empty_headers_server<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11285 12498 | where
|
11286 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::NoInputAndOutput, HandlerExtractors>,
|
12499 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::NullAndEmptyHeadersServer, HandlerExtractors>,
|
11287 12500 |
|
11288 12501 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11289 12502 | RestJson<L>,
|
11290 - | crate::operation_shape::NoInputAndOutput,
|
11291 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::NoInputAndOutput, HandlerType>
|
12503 + | crate::operation_shape::NullAndEmptyHeadersServer,
|
12504 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::NullAndEmptyHeadersServer, HandlerType>
|
11292 12505 | >,
|
11293 12506 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11294 12507 | RestJson<L>,
|
11295 - | crate::operation_shape::NoInputAndOutput,
|
12508 + | crate::operation_shape::NullAndEmptyHeadersServer,
|
11296 12509 | ModelPl::Output
|
11297 12510 | >,
|
11298 12511 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11299 12512 | RestJson<L>,
|
11300 - | crate::operation_shape::NoInputAndOutput,
|
12513 + | crate::operation_shape::NullAndEmptyHeadersServer,
|
11301 12514 | <
|
11302 12515 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11303 12516 | as ::aws_smithy_http_server::plugin::Plugin<
|
11304 12517 | RestJson<L>,
|
11305 - | crate::operation_shape::NoInputAndOutput,
|
12518 + | crate::operation_shape::NullAndEmptyHeadersServer,
|
11306 12519 | ModelPl::Output
|
11307 12520 | >
|
11308 12521 | >::Output
|
11309 12522 | >,
|
11310 12523 |
|
11311 12524 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11312 12525 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
11313 12526 |
|
11314 12527 | {
|
11315 12528 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11316 12529 | use ::aws_smithy_http_server::plugin::Plugin;
|
11317 - | let svc = crate::operation_shape::NoInputAndOutput::from_handler(handler);
|
12530 + | let svc = crate::operation_shape::NullAndEmptyHeadersServer::from_handler(handler);
|
11318 12531 | let svc = self.model_plugin.apply(svc);
|
11319 12532 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11320 12533 | .apply(svc);
|
11321 12534 | let svc = self.http_plugin.apply(svc);
|
11322 - | self.no_input_and_output_custom(svc)
|
12535 + | self.null_and_empty_headers_server_custom(svc)
|
11323 12536 | }
|
11324 12537 |
|
11325 - | /// Sets the [`NoInputAndOutput`](crate::operation_shape::NoInputAndOutput) operation.
|
12538 + | /// Sets the [`NullAndEmptyHeadersServer`](crate::operation_shape::NullAndEmptyHeadersServer) operation.
|
11326 12539 | ///
|
11327 12540 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11328 12541 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11329 12542 | ///
|
11330 12543 | /// # Example
|
11331 12544 | ///
|
11332 12545 | /// ```no_run
|
11333 12546 | /// use rest_json::{RestJson, RestJsonConfig};
|
11334 12547 | ///
|
11335 12548 | /// use rest_json::{input, output, error};
|
11336 12549 | ///
|
11337 - | /// async fn handler(input: input::NoInputAndOutputInput) -> Result<output::NoInputAndOutputOutput, std::convert::Infallible> {
|
12550 + | /// async fn handler(input: input::NullAndEmptyHeadersServerInput) -> Result<output::NullAndEmptyHeadersServerOutput, std::convert::Infallible> {
|
11338 12551 | /// todo!()
|
11339 12552 | /// }
|
11340 12553 | ///
|
11341 12554 | /// let config = RestJsonConfig::builder().build();
|
11342 12555 | /// let svc = ::tower::util::service_fn(handler);
|
11343 12556 | /// let app = RestJson::builder(config)
|
11344 - | /// .no_input_and_output_service(svc)
|
12557 + | /// .null_and_empty_headers_server_service(svc)
|
11345 12558 | /// /* Set other handlers */
|
11346 12559 | /// .build()
|
11347 12560 | /// .unwrap();
|
11348 12561 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11349 12562 | /// ```
|
11350 12563 | ///
|
11351 - | pub fn no_input_and_output_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12564 + | pub fn null_and_empty_headers_server_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11352 12565 | where
|
11353 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::NoInputAndOutput, ServiceExtractors>,
|
12566 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::NullAndEmptyHeadersServer, ServiceExtractors>,
|
11354 12567 |
|
11355 12568 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11356 12569 | RestJson<L>,
|
11357 - | crate::operation_shape::NoInputAndOutput,
|
11358 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::NoInputAndOutput, S>
|
12570 + | crate::operation_shape::NullAndEmptyHeadersServer,
|
12571 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::NullAndEmptyHeadersServer, S>
|
11359 12572 | >,
|
11360 12573 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11361 12574 | RestJson<L>,
|
11362 - | crate::operation_shape::NoInputAndOutput,
|
12575 + | crate::operation_shape::NullAndEmptyHeadersServer,
|
11363 12576 | ModelPl::Output
|
11364 12577 | >,
|
11365 12578 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11366 12579 | RestJson<L>,
|
11367 - | crate::operation_shape::NoInputAndOutput,
|
12580 + | crate::operation_shape::NullAndEmptyHeadersServer,
|
11368 12581 | <
|
11369 12582 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11370 12583 | as ::aws_smithy_http_server::plugin::Plugin<
|
11371 12584 | RestJson<L>,
|
11372 - | crate::operation_shape::NoInputAndOutput,
|
12585 + | crate::operation_shape::NullAndEmptyHeadersServer,
|
11373 12586 | ModelPl::Output
|
11374 12587 | >
|
11375 12588 | >::Output
|
11376 12589 | >,
|
11377 12590 |
|
11378 12591 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11379 12592 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
11380 12593 |
|
11381 12594 | {
|
11382 12595 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11383 12596 | use ::aws_smithy_http_server::plugin::Plugin;
|
11384 - | let svc = crate::operation_shape::NoInputAndOutput::from_service(service);
|
12597 + | let svc = crate::operation_shape::NullAndEmptyHeadersServer::from_service(service);
|
11385 12598 | let svc = self.model_plugin.apply(svc);
|
11386 12599 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11387 12600 | .apply(svc);
|
11388 12601 | let svc = self.http_plugin.apply(svc);
|
11389 - | self.no_input_and_output_custom(svc)
|
12602 + | self.null_and_empty_headers_server_custom(svc)
|
11390 12603 | }
|
11391 12604 |
|
11392 - | /// Sets the [`NoInputAndOutput`](crate::operation_shape::NoInputAndOutput) to a custom [`Service`](tower::Service).
|
12605 + | /// Sets the [`NullAndEmptyHeadersServer`](crate::operation_shape::NullAndEmptyHeadersServer) to a custom [`Service`](tower::Service).
|
11393 12606 | /// not constrained by the Smithy contract.
|
11394 - | fn no_input_and_output_custom<S>(mut self, svc: S) -> Self
|
12607 + | fn null_and_empty_headers_server_custom<S>(mut self, svc: S) -> Self
|
11395 12608 | where
|
11396 12609 | S: ::tower::Service<
|
11397 12610 | ::http_1x::Request<Body>,
|
11398 12611 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
11399 12612 | Error = ::std::convert::Infallible,
|
11400 12613 | > + Clone
|
11401 12614 | + Send
|
11402 12615 | + 'static,
|
11403 12616 | S::Future: Send + 'static,
|
11404 12617 | {
|
11405 - | self.no_input_and_output = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
12618 + | self.null_and_empty_headers_server =
|
12619 + | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
11406 12620 | self
|
11407 12621 | }
|
11408 12622 |
|
11409 - | /// Sets the [`NullAndEmptyHeadersClient`](crate::operation_shape::NullAndEmptyHeadersClient) operation.
|
12623 + | /// Sets the [`OmitsNullSerializesEmptyString`](crate::operation_shape::OmitsNullSerializesEmptyString) operation.
|
11410 12624 | ///
|
11411 12625 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11412 12626 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11413 12627 | ///
|
11414 12628 | /// # Example
|
11415 12629 | ///
|
11416 12630 | /// ```no_run
|
11417 12631 | /// use rest_json::{RestJson, RestJsonConfig};
|
11418 12632 | ///
|
11419 12633 | /// use rest_json::{input, output, error};
|
11420 12634 | ///
|
11421 - | /// async fn handler(input: input::NullAndEmptyHeadersClientInput) -> output::NullAndEmptyHeadersClientOutput {
|
12635 + | /// async fn handler(input: input::OmitsNullSerializesEmptyStringInput) -> output::OmitsNullSerializesEmptyStringOutput {
|
11422 12636 | /// todo!()
|
11423 12637 | /// }
|
11424 12638 | ///
|
11425 12639 | /// let config = RestJsonConfig::builder().build();
|
11426 12640 | /// let app = RestJson::builder(config)
|
11427 - | /// .null_and_empty_headers_client(handler)
|
12641 + | /// .omits_null_serializes_empty_string(handler)
|
11428 12642 | /// /* Set other handlers */
|
11429 12643 | /// .build()
|
11430 12644 | /// .unwrap();
|
11431 12645 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11432 12646 | /// ```
|
11433 12647 | ///
|
11434 - | pub fn null_and_empty_headers_client<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12648 + | pub fn omits_null_serializes_empty_string<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11435 12649 | where
|
11436 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::NullAndEmptyHeadersClient, HandlerExtractors>,
|
12650 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::OmitsNullSerializesEmptyString, HandlerExtractors>,
|
11437 12651 |
|
11438 12652 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11439 12653 | RestJson<L>,
|
11440 - | crate::operation_shape::NullAndEmptyHeadersClient,
|
11441 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::NullAndEmptyHeadersClient, HandlerType>
|
12654 + | crate::operation_shape::OmitsNullSerializesEmptyString,
|
12655 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::OmitsNullSerializesEmptyString, HandlerType>
|
11442 12656 | >,
|
11443 12657 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11444 12658 | RestJson<L>,
|
11445 - | crate::operation_shape::NullAndEmptyHeadersClient,
|
12659 + | crate::operation_shape::OmitsNullSerializesEmptyString,
|
11446 12660 | ModelPl::Output
|
11447 12661 | >,
|
11448 12662 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11449 12663 | RestJson<L>,
|
11450 - | crate::operation_shape::NullAndEmptyHeadersClient,
|
12664 + | crate::operation_shape::OmitsNullSerializesEmptyString,
|
11451 12665 | <
|
11452 12666 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11453 12667 | as ::aws_smithy_http_server::plugin::Plugin<
|
11454 12668 | RestJson<L>,
|
11455 - | crate::operation_shape::NullAndEmptyHeadersClient,
|
12669 + | crate::operation_shape::OmitsNullSerializesEmptyString,
|
11456 12670 | ModelPl::Output
|
11457 12671 | >
|
11458 12672 | >::Output
|
11459 12673 | >,
|
11460 12674 |
|
11461 12675 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11462 12676 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
11463 12677 |
|
11464 12678 | {
|
11465 12679 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11466 12680 | use ::aws_smithy_http_server::plugin::Plugin;
|
11467 - | let svc = crate::operation_shape::NullAndEmptyHeadersClient::from_handler(handler);
|
12681 + | let svc = crate::operation_shape::OmitsNullSerializesEmptyString::from_handler(handler);
|
11468 12682 | let svc = self.model_plugin.apply(svc);
|
11469 12683 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11470 12684 | .apply(svc);
|
11471 12685 | let svc = self.http_plugin.apply(svc);
|
11472 - | self.null_and_empty_headers_client_custom(svc)
|
12686 + | self.omits_null_serializes_empty_string_custom(svc)
|
11473 12687 | }
|
11474 12688 |
|
11475 - | /// Sets the [`NullAndEmptyHeadersClient`](crate::operation_shape::NullAndEmptyHeadersClient) operation.
|
12689 + | /// Sets the [`OmitsNullSerializesEmptyString`](crate::operation_shape::OmitsNullSerializesEmptyString) operation.
|
11476 12690 | ///
|
11477 12691 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11478 12692 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11479 12693 | ///
|
11480 12694 | /// # Example
|
11481 12695 | ///
|
11482 12696 | /// ```no_run
|
11483 12697 | /// use rest_json::{RestJson, RestJsonConfig};
|
11484 12698 | ///
|
11485 12699 | /// use rest_json::{input, output, error};
|
11486 12700 | ///
|
11487 - | /// async fn handler(input: input::NullAndEmptyHeadersClientInput) -> Result<output::NullAndEmptyHeadersClientOutput, std::convert::Infallible> {
|
12701 + | /// async fn handler(input: input::OmitsNullSerializesEmptyStringInput) -> Result<output::OmitsNullSerializesEmptyStringOutput, std::convert::Infallible> {
|
11488 12702 | /// todo!()
|
11489 12703 | /// }
|
11490 12704 | ///
|
11491 12705 | /// let config = RestJsonConfig::builder().build();
|
11492 12706 | /// let svc = ::tower::util::service_fn(handler);
|
11493 12707 | /// let app = RestJson::builder(config)
|
11494 - | /// .null_and_empty_headers_client_service(svc)
|
12708 + | /// .omits_null_serializes_empty_string_service(svc)
|
11495 12709 | /// /* Set other handlers */
|
11496 12710 | /// .build()
|
11497 12711 | /// .unwrap();
|
11498 12712 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11499 12713 | /// ```
|
11500 12714 | ///
|
11501 - | pub fn null_and_empty_headers_client_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12715 + | pub fn omits_null_serializes_empty_string_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11502 12716 | where
|
11503 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::NullAndEmptyHeadersClient, ServiceExtractors>,
|
12717 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::OmitsNullSerializesEmptyString, ServiceExtractors>,
|
11504 12718 |
|
11505 12719 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11506 12720 | RestJson<L>,
|
11507 - | crate::operation_shape::NullAndEmptyHeadersClient,
|
11508 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::NullAndEmptyHeadersClient, S>
|
12721 + | crate::operation_shape::OmitsNullSerializesEmptyString,
|
12722 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::OmitsNullSerializesEmptyString, S>
|
11509 12723 | >,
|
11510 12724 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11511 12725 | RestJson<L>,
|
11512 - | crate::operation_shape::NullAndEmptyHeadersClient,
|
12726 + | crate::operation_shape::OmitsNullSerializesEmptyString,
|
11513 12727 | ModelPl::Output
|
11514 12728 | >,
|
11515 12729 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11516 12730 | RestJson<L>,
|
11517 - | crate::operation_shape::NullAndEmptyHeadersClient,
|
12731 + | crate::operation_shape::OmitsNullSerializesEmptyString,
|
11518 12732 | <
|
11519 12733 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11520 12734 | as ::aws_smithy_http_server::plugin::Plugin<
|
11521 12735 | RestJson<L>,
|
11522 - | crate::operation_shape::NullAndEmptyHeadersClient,
|
12736 + | crate::operation_shape::OmitsNullSerializesEmptyString,
|
11523 12737 | ModelPl::Output
|
11524 12738 | >
|
11525 12739 | >::Output
|
11526 12740 | >,
|
11527 12741 |
|
11528 12742 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11529 12743 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
11530 12744 |
|
11531 12745 | {
|
11532 12746 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11533 12747 | use ::aws_smithy_http_server::plugin::Plugin;
|
11534 - | let svc = crate::operation_shape::NullAndEmptyHeadersClient::from_service(service);
|
12748 + | let svc = crate::operation_shape::OmitsNullSerializesEmptyString::from_service(service);
|
11535 12749 | let svc = self.model_plugin.apply(svc);
|
11536 12750 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11537 12751 | .apply(svc);
|
11538 12752 | let svc = self.http_plugin.apply(svc);
|
11539 - | self.null_and_empty_headers_client_custom(svc)
|
12753 + | self.omits_null_serializes_empty_string_custom(svc)
|
11540 12754 | }
|
11541 12755 |
|
11542 - | /// Sets the [`NullAndEmptyHeadersClient`](crate::operation_shape::NullAndEmptyHeadersClient) to a custom [`Service`](tower::Service).
|
12756 + | /// Sets the [`OmitsNullSerializesEmptyString`](crate::operation_shape::OmitsNullSerializesEmptyString) to a custom [`Service`](tower::Service).
|
11543 12757 | /// not constrained by the Smithy contract.
|
11544 - | fn null_and_empty_headers_client_custom<S>(mut self, svc: S) -> Self
|
12758 + | fn omits_null_serializes_empty_string_custom<S>(mut self, svc: S) -> Self
|
11545 12759 | where
|
11546 12760 | S: ::tower::Service<
|
11547 12761 | ::http_1x::Request<Body>,
|
11548 12762 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
11549 12763 | Error = ::std::convert::Infallible,
|
11550 12764 | > + Clone
|
11551 12765 | + Send
|
11552 12766 | + 'static,
|
11553 12767 | S::Future: Send + 'static,
|
11554 12768 | {
|
11555 - | self.null_and_empty_headers_client =
|
12769 + | self.omits_null_serializes_empty_string =
|
11556 12770 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
11557 12771 | self
|
11558 12772 | }
|
11559 12773 |
|
11560 - | /// Sets the [`NullAndEmptyHeadersServer`](crate::operation_shape::NullAndEmptyHeadersServer) operation.
|
12774 + | /// Sets the [`OmitsSerializingEmptyLists`](crate::operation_shape::OmitsSerializingEmptyLists) operation.
|
11561 12775 | ///
|
11562 12776 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11563 12777 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11564 12778 | ///
|
11565 12779 | /// # Example
|
11566 12780 | ///
|
11567 12781 | /// ```no_run
|
11568 12782 | /// use rest_json::{RestJson, RestJsonConfig};
|
11569 12783 | ///
|
11570 12784 | /// use rest_json::{input, output, error};
|
11571 12785 | ///
|
11572 - | /// async fn handler(input: input::NullAndEmptyHeadersServerInput) -> output::NullAndEmptyHeadersServerOutput {
|
12786 + | /// async fn handler(input: input::OmitsSerializingEmptyListsInput) -> Result<output::OmitsSerializingEmptyListsOutput, error::OmitsSerializingEmptyListsError> {
|
11573 12787 | /// todo!()
|
11574 12788 | /// }
|
11575 12789 | ///
|
11576 12790 | /// let config = RestJsonConfig::builder().build();
|
11577 12791 | /// let app = RestJson::builder(config)
|
11578 - | /// .null_and_empty_headers_server(handler)
|
12792 + | /// .omits_serializing_empty_lists(handler)
|
11579 12793 | /// /* Set other handlers */
|
11580 12794 | /// .build()
|
11581 12795 | /// .unwrap();
|
11582 12796 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11583 12797 | /// ```
|
11584 12798 | ///
|
11585 - | pub fn null_and_empty_headers_server<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12799 + | pub fn omits_serializing_empty_lists<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11586 12800 | where
|
11587 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::NullAndEmptyHeadersServer, HandlerExtractors>,
|
12801 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::OmitsSerializingEmptyLists, HandlerExtractors>,
|
11588 12802 |
|
11589 12803 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11590 12804 | RestJson<L>,
|
11591 - | crate::operation_shape::NullAndEmptyHeadersServer,
|
11592 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::NullAndEmptyHeadersServer, HandlerType>
|
12805 + | crate::operation_shape::OmitsSerializingEmptyLists,
|
12806 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::OmitsSerializingEmptyLists, HandlerType>
|
11593 12807 | >,
|
11594 12808 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11595 12809 | RestJson<L>,
|
11596 - | crate::operation_shape::NullAndEmptyHeadersServer,
|
12810 + | crate::operation_shape::OmitsSerializingEmptyLists,
|
11597 12811 | ModelPl::Output
|
11598 12812 | >,
|
11599 12813 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11600 12814 | RestJson<L>,
|
11601 - | crate::operation_shape::NullAndEmptyHeadersServer,
|
12815 + | crate::operation_shape::OmitsSerializingEmptyLists,
|
11602 12816 | <
|
11603 12817 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11604 12818 | as ::aws_smithy_http_server::plugin::Plugin<
|
11605 12819 | RestJson<L>,
|
11606 - | crate::operation_shape::NullAndEmptyHeadersServer,
|
12820 + | crate::operation_shape::OmitsSerializingEmptyLists,
|
11607 12821 | ModelPl::Output
|
11608 12822 | >
|
11609 12823 | >::Output
|
11610 12824 | >,
|
11611 12825 |
|
11612 12826 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11613 12827 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
11614 12828 |
|
11615 12829 | {
|
11616 12830 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11617 12831 | use ::aws_smithy_http_server::plugin::Plugin;
|
11618 - | let svc = crate::operation_shape::NullAndEmptyHeadersServer::from_handler(handler);
|
12832 + | let svc = crate::operation_shape::OmitsSerializingEmptyLists::from_handler(handler);
|
11619 12833 | let svc = self.model_plugin.apply(svc);
|
11620 12834 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11621 12835 | .apply(svc);
|
11622 12836 | let svc = self.http_plugin.apply(svc);
|
11623 - | self.null_and_empty_headers_server_custom(svc)
|
12837 + | self.omits_serializing_empty_lists_custom(svc)
|
11624 12838 | }
|
11625 12839 |
|
11626 - | /// Sets the [`NullAndEmptyHeadersServer`](crate::operation_shape::NullAndEmptyHeadersServer) operation.
|
12840 + | /// Sets the [`OmitsSerializingEmptyLists`](crate::operation_shape::OmitsSerializingEmptyLists) operation.
|
11627 12841 | ///
|
11628 12842 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11629 12843 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11630 12844 | ///
|
11631 12845 | /// # Example
|
11632 12846 | ///
|
11633 12847 | /// ```no_run
|
11634 12848 | /// use rest_json::{RestJson, RestJsonConfig};
|
11635 12849 | ///
|
11636 12850 | /// use rest_json::{input, output, error};
|
11637 12851 | ///
|
11638 - | /// async fn handler(input: input::NullAndEmptyHeadersServerInput) -> Result<output::NullAndEmptyHeadersServerOutput, std::convert::Infallible> {
|
12852 + | /// async fn handler(input: input::OmitsSerializingEmptyListsInput) -> Result<output::OmitsSerializingEmptyListsOutput, error::OmitsSerializingEmptyListsError> {
|
11639 12853 | /// todo!()
|
11640 12854 | /// }
|
11641 12855 | ///
|
11642 12856 | /// let config = RestJsonConfig::builder().build();
|
11643 12857 | /// let svc = ::tower::util::service_fn(handler);
|
11644 12858 | /// let app = RestJson::builder(config)
|
11645 - | /// .null_and_empty_headers_server_service(svc)
|
12859 + | /// .omits_serializing_empty_lists_service(svc)
|
11646 12860 | /// /* Set other handlers */
|
11647 12861 | /// .build()
|
11648 12862 | /// .unwrap();
|
11649 12863 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11650 12864 | /// ```
|
11651 12865 | ///
|
11652 - | pub fn null_and_empty_headers_server_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12866 + | pub fn omits_serializing_empty_lists_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11653 12867 | where
|
11654 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::NullAndEmptyHeadersServer, ServiceExtractors>,
|
12868 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::OmitsSerializingEmptyLists, ServiceExtractors>,
|
11655 12869 |
|
11656 12870 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11657 12871 | RestJson<L>,
|
11658 - | crate::operation_shape::NullAndEmptyHeadersServer,
|
11659 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::NullAndEmptyHeadersServer, S>
|
12872 + | crate::operation_shape::OmitsSerializingEmptyLists,
|
12873 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::OmitsSerializingEmptyLists, S>
|
11660 12874 | >,
|
11661 12875 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11662 12876 | RestJson<L>,
|
11663 - | crate::operation_shape::NullAndEmptyHeadersServer,
|
12877 + | crate::operation_shape::OmitsSerializingEmptyLists,
|
11664 12878 | ModelPl::Output
|
11665 12879 | >,
|
11666 12880 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11667 12881 | RestJson<L>,
|
11668 - | crate::operation_shape::NullAndEmptyHeadersServer,
|
12882 + | crate::operation_shape::OmitsSerializingEmptyLists,
|
11669 12883 | <
|
11670 12884 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11671 12885 | as ::aws_smithy_http_server::plugin::Plugin<
|
11672 12886 | RestJson<L>,
|
11673 - | crate::operation_shape::NullAndEmptyHeadersServer,
|
12887 + | crate::operation_shape::OmitsSerializingEmptyLists,
|
11674 12888 | ModelPl::Output
|
11675 12889 | >
|
11676 12890 | >::Output
|
11677 12891 | >,
|
11678 12892 |
|
11679 12893 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11680 12894 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
11681 12895 |
|
11682 12896 | {
|
11683 12897 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11684 12898 | use ::aws_smithy_http_server::plugin::Plugin;
|
11685 - | let svc = crate::operation_shape::NullAndEmptyHeadersServer::from_service(service);
|
12899 + | let svc = crate::operation_shape::OmitsSerializingEmptyLists::from_service(service);
|
11686 12900 | let svc = self.model_plugin.apply(svc);
|
11687 12901 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11688 12902 | .apply(svc);
|
11689 12903 | let svc = self.http_plugin.apply(svc);
|
11690 - | self.null_and_empty_headers_server_custom(svc)
|
12904 + | self.omits_serializing_empty_lists_custom(svc)
|
11691 12905 | }
|
11692 12906 |
|
11693 - | /// Sets the [`NullAndEmptyHeadersServer`](crate::operation_shape::NullAndEmptyHeadersServer) to a custom [`Service`](tower::Service).
|
12907 + | /// Sets the [`OmitsSerializingEmptyLists`](crate::operation_shape::OmitsSerializingEmptyLists) to a custom [`Service`](tower::Service).
|
11694 12908 | /// not constrained by the Smithy contract.
|
11695 - | fn null_and_empty_headers_server_custom<S>(mut self, svc: S) -> Self
|
12909 + | fn omits_serializing_empty_lists_custom<S>(mut self, svc: S) -> Self
|
11696 12910 | where
|
11697 12911 | S: ::tower::Service<
|
11698 12912 | ::http_1x::Request<Body>,
|
11699 12913 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
11700 12914 | Error = ::std::convert::Infallible,
|
11701 12915 | > + Clone
|
11702 12916 | + Send
|
11703 12917 | + 'static,
|
11704 12918 | S::Future: Send + 'static,
|
11705 12919 | {
|
11706 - | self.null_and_empty_headers_server =
|
12920 + | self.omits_serializing_empty_lists =
|
11707 12921 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
11708 12922 | self
|
11709 12923 | }
|
11710 12924 |
|
11711 - | /// Sets the [`OmitsNullSerializesEmptyString`](crate::operation_shape::OmitsNullSerializesEmptyString) operation.
|
12925 + | /// Sets the [`OperationWithDefaults`](crate::operation_shape::OperationWithDefaults) operation.
|
11712 12926 | ///
|
11713 12927 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11714 12928 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11715 12929 | ///
|
11716 12930 | /// # Example
|
11717 12931 | ///
|
11718 12932 | /// ```no_run
|
11719 12933 | /// use rest_json::{RestJson, RestJsonConfig};
|
11720 12934 | ///
|
11721 12935 | /// use rest_json::{input, output, error};
|
11722 12936 | ///
|
11723 - | /// async fn handler(input: input::OmitsNullSerializesEmptyStringInput) -> output::OmitsNullSerializesEmptyStringOutput {
|
12937 + | /// async fn handler(input: input::OperationWithDefaultsInput) -> Result<output::OperationWithDefaultsOutput, error::OperationWithDefaultsError> {
|
11724 12938 | /// todo!()
|
11725 12939 | /// }
|
11726 12940 | ///
|
11727 12941 | /// let config = RestJsonConfig::builder().build();
|
11728 12942 | /// let app = RestJson::builder(config)
|
11729 - | /// .omits_null_serializes_empty_string(handler)
|
12943 + | /// .operation_with_defaults(handler)
|
11730 12944 | /// /* Set other handlers */
|
11731 12945 | /// .build()
|
11732 12946 | /// .unwrap();
|
11733 12947 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11734 12948 | /// ```
|
11735 12949 | ///
|
11736 - | pub fn omits_null_serializes_empty_string<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12950 + | pub fn operation_with_defaults<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11737 12951 | where
|
11738 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::OmitsNullSerializesEmptyString, HandlerExtractors>,
|
12952 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::OperationWithDefaults, HandlerExtractors>,
|
11739 12953 |
|
11740 12954 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11741 12955 | RestJson<L>,
|
11742 - | crate::operation_shape::OmitsNullSerializesEmptyString,
|
11743 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::OmitsNullSerializesEmptyString, HandlerType>
|
12956 + | crate::operation_shape::OperationWithDefaults,
|
12957 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::OperationWithDefaults, HandlerType>
|
11744 12958 | >,
|
11745 12959 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11746 12960 | RestJson<L>,
|
11747 - | crate::operation_shape::OmitsNullSerializesEmptyString,
|
12961 + | crate::operation_shape::OperationWithDefaults,
|
11748 12962 | ModelPl::Output
|
11749 12963 | >,
|
11750 12964 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11751 12965 | RestJson<L>,
|
11752 - | crate::operation_shape::OmitsNullSerializesEmptyString,
|
12966 + | crate::operation_shape::OperationWithDefaults,
|
11753 12967 | <
|
11754 12968 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11755 12969 | as ::aws_smithy_http_server::plugin::Plugin<
|
11756 12970 | RestJson<L>,
|
11757 - | crate::operation_shape::OmitsNullSerializesEmptyString,
|
12971 + | crate::operation_shape::OperationWithDefaults,
|
11758 12972 | ModelPl::Output
|
11759 12973 | >
|
11760 12974 | >::Output
|
11761 12975 | >,
|
11762 12976 |
|
11763 12977 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11764 12978 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
11765 12979 |
|
11766 12980 | {
|
11767 12981 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11768 12982 | use ::aws_smithy_http_server::plugin::Plugin;
|
11769 - | let svc = crate::operation_shape::OmitsNullSerializesEmptyString::from_handler(handler);
|
12983 + | let svc = crate::operation_shape::OperationWithDefaults::from_handler(handler);
|
11770 12984 | let svc = self.model_plugin.apply(svc);
|
11771 12985 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11772 12986 | .apply(svc);
|
11773 12987 | let svc = self.http_plugin.apply(svc);
|
11774 - | self.omits_null_serializes_empty_string_custom(svc)
|
12988 + | self.operation_with_defaults_custom(svc)
|
11775 12989 | }
|
11776 12990 |
|
11777 - | /// Sets the [`OmitsNullSerializesEmptyString`](crate::operation_shape::OmitsNullSerializesEmptyString) operation.
|
12991 + | /// Sets the [`OperationWithDefaults`](crate::operation_shape::OperationWithDefaults) operation.
|
11778 12992 | ///
|
11779 12993 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11780 12994 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11781 12995 | ///
|
11782 12996 | /// # Example
|
11783 12997 | ///
|
11784 12998 | /// ```no_run
|
11785 12999 | /// use rest_json::{RestJson, RestJsonConfig};
|
11786 13000 | ///
|
11787 13001 | /// use rest_json::{input, output, error};
|
11788 13002 | ///
|
11789 - | /// async fn handler(input: input::OmitsNullSerializesEmptyStringInput) -> Result<output::OmitsNullSerializesEmptyStringOutput, std::convert::Infallible> {
|
13003 + | /// async fn handler(input: input::OperationWithDefaultsInput) -> Result<output::OperationWithDefaultsOutput, error::OperationWithDefaultsError> {
|
11790 13004 | /// todo!()
|
11791 13005 | /// }
|
11792 13006 | ///
|
11793 13007 | /// let config = RestJsonConfig::builder().build();
|
11794 13008 | /// let svc = ::tower::util::service_fn(handler);
|
11795 13009 | /// let app = RestJson::builder(config)
|
11796 - | /// .omits_null_serializes_empty_string_service(svc)
|
13010 + | /// .operation_with_defaults_service(svc)
|
11797 13011 | /// /* Set other handlers */
|
11798 13012 | /// .build()
|
11799 13013 | /// .unwrap();
|
11800 13014 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11801 13015 | /// ```
|
11802 13016 | ///
|
11803 - | pub fn omits_null_serializes_empty_string_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
13017 + | pub fn operation_with_defaults_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11804 13018 | where
|
11805 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::OmitsNullSerializesEmptyString, ServiceExtractors>,
|
13019 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::OperationWithDefaults, ServiceExtractors>,
|
11806 13020 |
|
11807 13021 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11808 13022 | RestJson<L>,
|
11809 - | crate::operation_shape::OmitsNullSerializesEmptyString,
|
11810 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::OmitsNullSerializesEmptyString, S>
|
13023 + | crate::operation_shape::OperationWithDefaults,
|
13024 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::OperationWithDefaults, S>
|
11811 13025 | >,
|
11812 13026 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11813 13027 | RestJson<L>,
|
11814 - | crate::operation_shape::OmitsNullSerializesEmptyString,
|
13028 + | crate::operation_shape::OperationWithDefaults,
|
11815 13029 | ModelPl::Output
|
11816 13030 | >,
|
11817 13031 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11818 13032 | RestJson<L>,
|
11819 - | crate::operation_shape::OmitsNullSerializesEmptyString,
|
13033 + | crate::operation_shape::OperationWithDefaults,
|
11820 13034 | <
|
11821 13035 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11822 13036 | as ::aws_smithy_http_server::plugin::Plugin<
|
11823 13037 | RestJson<L>,
|
11824 - | crate::operation_shape::OmitsNullSerializesEmptyString,
|
13038 + | crate::operation_shape::OperationWithDefaults,
|
11825 13039 | ModelPl::Output
|
11826 13040 | >
|
11827 13041 | >::Output
|
11828 13042 | >,
|
11829 13043 |
|
11830 13044 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11831 13045 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
11832 13046 |
|
11833 13047 | {
|
11834 13048 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11835 13049 | use ::aws_smithy_http_server::plugin::Plugin;
|
11836 - | let svc = crate::operation_shape::OmitsNullSerializesEmptyString::from_service(service);
|
13050 + | let svc = crate::operation_shape::OperationWithDefaults::from_service(service);
|
11837 13051 | let svc = self.model_plugin.apply(svc);
|
11838 13052 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11839 13053 | .apply(svc);
|
11840 13054 | let svc = self.http_plugin.apply(svc);
|
11841 - | self.omits_null_serializes_empty_string_custom(svc)
|
13055 + | self.operation_with_defaults_custom(svc)
|
11842 13056 | }
|
11843 13057 |
|
11844 - | /// Sets the [`OmitsNullSerializesEmptyString`](crate::operation_shape::OmitsNullSerializesEmptyString) to a custom [`Service`](tower::Service).
|
13058 + | /// Sets the [`OperationWithDefaults`](crate::operation_shape::OperationWithDefaults) to a custom [`Service`](tower::Service).
|
11845 13059 | /// not constrained by the Smithy contract.
|
11846 - | fn omits_null_serializes_empty_string_custom<S>(mut self, svc: S) -> Self
|
13060 + | fn operation_with_defaults_custom<S>(mut self, svc: S) -> Self
|
11847 13061 | where
|
11848 13062 | S: ::tower::Service<
|
11849 13063 | ::http_1x::Request<Body>,
|
11850 13064 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
11851 13065 | Error = ::std::convert::Infallible,
|
11852 13066 | > + Clone
|
11853 13067 | + Send
|
11854 13068 | + 'static,
|
11855 13069 | S::Future: Send + 'static,
|
11856 13070 | {
|
11857 - | self.omits_null_serializes_empty_string =
|
11858 - | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
13071 + | self.operation_with_defaults = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
11859 13072 | self
|
11860 13073 | }
|
11861 13074 |
|
11862 - | /// Sets the [`OmitsSerializingEmptyLists`](crate::operation_shape::OmitsSerializingEmptyLists) operation.
|
13075 + | /// Sets the [`OperationWithNestedStructure`](crate::operation_shape::OperationWithNestedStructure) operation.
|
11863 13076 | ///
|
11864 13077 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11865 13078 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11866 13079 | ///
|
11867 13080 | /// # Example
|
11868 13081 | ///
|
11869 13082 | /// ```no_run
|
11870 13083 | /// use rest_json::{RestJson, RestJsonConfig};
|
11871 13084 | ///
|
11872 13085 | /// use rest_json::{input, output, error};
|
11873 13086 | ///
|
11874 - | /// async fn handler(input: input::OmitsSerializingEmptyListsInput) -> Result<output::OmitsSerializingEmptyListsOutput, error::OmitsSerializingEmptyListsError> {
|
13087 + | /// async fn handler(input: input::OperationWithNestedStructureInput) -> Result<output::OperationWithNestedStructureOutput, error::OperationWithNestedStructureError> {
|
11875 13088 | /// todo!()
|
11876 13089 | /// }
|
11877 13090 | ///
|
11878 13091 | /// let config = RestJsonConfig::builder().build();
|
11879 13092 | /// let app = RestJson::builder(config)
|
11880 - | /// .omits_serializing_empty_lists(handler)
|
13093 + | /// .operation_with_nested_structure(handler)
|
11881 13094 | /// /* Set other handlers */
|
11882 13095 | /// .build()
|
11883 13096 | /// .unwrap();
|
11884 13097 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11885 13098 | /// ```
|
11886 13099 | ///
|
11887 - | pub fn omits_serializing_empty_lists<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
13100 + | pub fn operation_with_nested_structure<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
11888 13101 | where
|
11889 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::OmitsSerializingEmptyLists, HandlerExtractors>,
|
13102 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::OperationWithNestedStructure, HandlerExtractors>,
|
11890 13103 |
|
11891 13104 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11892 13105 | RestJson<L>,
|
11893 - | crate::operation_shape::OmitsSerializingEmptyLists,
|
11894 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::OmitsSerializingEmptyLists, HandlerType>
|
13106 + | crate::operation_shape::OperationWithNestedStructure,
|
13107 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::OperationWithNestedStructure, HandlerType>
|
11895 13108 | >,
|
11896 13109 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11897 13110 | RestJson<L>,
|
11898 - | crate::operation_shape::OmitsSerializingEmptyLists,
|
13111 + | crate::operation_shape::OperationWithNestedStructure,
|
11899 13112 | ModelPl::Output
|
11900 13113 | >,
|
11901 13114 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11902 13115 | RestJson<L>,
|
11903 - | crate::operation_shape::OmitsSerializingEmptyLists,
|
13116 + | crate::operation_shape::OperationWithNestedStructure,
|
11904 13117 | <
|
11905 13118 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11906 13119 | as ::aws_smithy_http_server::plugin::Plugin<
|
11907 13120 | RestJson<L>,
|
11908 - | crate::operation_shape::OmitsSerializingEmptyLists,
|
13121 + | crate::operation_shape::OperationWithNestedStructure,
|
11909 13122 | ModelPl::Output
|
11910 13123 | >
|
11911 13124 | >::Output
|
11912 13125 | >,
|
11913 13126 |
|
11914 13127 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11915 13128 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
11916 13129 |
|
11917 13130 | {
|
11918 13131 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11919 13132 | use ::aws_smithy_http_server::plugin::Plugin;
|
11920 - | let svc = crate::operation_shape::OmitsSerializingEmptyLists::from_handler(handler);
|
13133 + | let svc = crate::operation_shape::OperationWithNestedStructure::from_handler(handler);
|
11921 13134 | let svc = self.model_plugin.apply(svc);
|
11922 13135 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11923 13136 | .apply(svc);
|
11924 13137 | let svc = self.http_plugin.apply(svc);
|
11925 - | self.omits_serializing_empty_lists_custom(svc)
|
13138 + | self.operation_with_nested_structure_custom(svc)
|
11926 13139 | }
|
11927 13140 |
|
11928 - | /// Sets the [`OmitsSerializingEmptyLists`](crate::operation_shape::OmitsSerializingEmptyLists) operation.
|
13141 + | /// Sets the [`OperationWithNestedStructure`](crate::operation_shape::OperationWithNestedStructure) operation.
|
11929 13142 | ///
|
11930 13143 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
11931 13144 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
11932 13145 | ///
|
11933 13146 | /// # Example
|
11934 13147 | ///
|
11935 13148 | /// ```no_run
|
11936 13149 | /// use rest_json::{RestJson, RestJsonConfig};
|
11937 13150 | ///
|
11938 13151 | /// use rest_json::{input, output, error};
|
11939 13152 | ///
|
11940 - | /// async fn handler(input: input::OmitsSerializingEmptyListsInput) -> Result<output::OmitsSerializingEmptyListsOutput, error::OmitsSerializingEmptyListsError> {
|
13153 + | /// async fn handler(input: input::OperationWithNestedStructureInput) -> Result<output::OperationWithNestedStructureOutput, error::OperationWithNestedStructureError> {
|
11941 13154 | /// todo!()
|
11942 13155 | /// }
|
11943 13156 | ///
|
11944 13157 | /// let config = RestJsonConfig::builder().build();
|
11945 13158 | /// let svc = ::tower::util::service_fn(handler);
|
11946 13159 | /// let app = RestJson::builder(config)
|
11947 - | /// .omits_serializing_empty_lists_service(svc)
|
13160 + | /// .operation_with_nested_structure_service(svc)
|
11948 13161 | /// /* Set other handlers */
|
11949 13162 | /// .build()
|
11950 13163 | /// .unwrap();
|
11951 13164 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
11952 13165 | /// ```
|
11953 13166 | ///
|
11954 - | pub fn omits_serializing_empty_lists_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
13167 + | pub fn operation_with_nested_structure_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
11955 13168 | where
|
11956 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::OmitsSerializingEmptyLists, ServiceExtractors>,
|
13169 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::OperationWithNestedStructure, ServiceExtractors>,
|
11957 13170 |
|
11958 13171 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
11959 13172 | RestJson<L>,
|
11960 - | crate::operation_shape::OmitsSerializingEmptyLists,
|
11961 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::OmitsSerializingEmptyLists, S>
|
13173 + | crate::operation_shape::OperationWithNestedStructure,
|
13174 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::OperationWithNestedStructure, S>
|
11962 13175 | >,
|
11963 13176 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
11964 13177 | RestJson<L>,
|
11965 - | crate::operation_shape::OmitsSerializingEmptyLists,
|
13178 + | crate::operation_shape::OperationWithNestedStructure,
|
11966 13179 | ModelPl::Output
|
11967 13180 | >,
|
11968 13181 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
11969 13182 | RestJson<L>,
|
11970 - | crate::operation_shape::OmitsSerializingEmptyLists,
|
13183 + | crate::operation_shape::OperationWithNestedStructure,
|
11971 13184 | <
|
11972 13185 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
11973 13186 | as ::aws_smithy_http_server::plugin::Plugin<
|
11974 13187 | RestJson<L>,
|
11975 - | crate::operation_shape::OmitsSerializingEmptyLists,
|
13188 + | crate::operation_shape::OperationWithNestedStructure,
|
11976 13189 | ModelPl::Output
|
11977 13190 | >
|
11978 13191 | >::Output
|
11979 13192 | >,
|
11980 13193 |
|
11981 13194 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
11982 13195 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
11983 13196 |
|
11984 13197 | {
|
11985 13198 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
11986 13199 | use ::aws_smithy_http_server::plugin::Plugin;
|
11987 - | let svc = crate::operation_shape::OmitsSerializingEmptyLists::from_service(service);
|
13200 + | let svc = crate::operation_shape::OperationWithNestedStructure::from_service(service);
|
11988 13201 | let svc = self.model_plugin.apply(svc);
|
11989 13202 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
11990 13203 | .apply(svc);
|
11991 13204 | let svc = self.http_plugin.apply(svc);
|
11992 - | self.omits_serializing_empty_lists_custom(svc)
|
13205 + | self.operation_with_nested_structure_custom(svc)
|
11993 13206 | }
|
11994 13207 |
|
11995 - | /// Sets the [`OmitsSerializingEmptyLists`](crate::operation_shape::OmitsSerializingEmptyLists) to a custom [`Service`](tower::Service).
|
13208 + | /// Sets the [`OperationWithNestedStructure`](crate::operation_shape::OperationWithNestedStructure) to a custom [`Service`](tower::Service).
|
11996 13209 | /// not constrained by the Smithy contract.
|
11997 - | fn omits_serializing_empty_lists_custom<S>(mut self, svc: S) -> Self
|
13210 + | fn operation_with_nested_structure_custom<S>(mut self, svc: S) -> Self
|
11998 13211 | where
|
11999 13212 | S: ::tower::Service<
|
12000 13213 | ::http_1x::Request<Body>,
|
12001 13214 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
12002 13215 | Error = ::std::convert::Infallible,
|
12003 13216 | > + Clone
|
12004 13217 | + Send
|
12005 13218 | + 'static,
|
12006 13219 | S::Future: Send + 'static,
|
12007 13220 | {
|
12008 - | self.omits_serializing_empty_lists =
|
13221 + | self.operation_with_nested_structure =
|
12009 13222 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
12010 13223 | self
|
12011 13224 | }
|
12012 13225 |
|
12013 - | /// Sets the [`OperationWithDefaults`](crate::operation_shape::OperationWithDefaults) operation.
|
13226 + | /// Sets the [`OutputStream`](crate::operation_shape::OutputStream) operation.
|
12014 13227 | ///
|
12015 13228 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
12016 13229 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
12017 13230 | ///
|
12018 13231 | /// # Example
|
12019 13232 | ///
|
12020 13233 | /// ```no_run
|
12021 13234 | /// use rest_json::{RestJson, RestJsonConfig};
|
12022 13235 | ///
|
12023 13236 | /// use rest_json::{input, output, error};
|
12024 13237 | ///
|
12025 - | /// async fn handler(input: input::OperationWithDefaultsInput) -> Result<output::OperationWithDefaultsOutput, error::OperationWithDefaultsError> {
|
13238 + | /// async fn handler(input: input::OutputStreamInput) -> Result<output::OutputStreamOutput, error::OutputStreamError> {
|
12026 13239 | /// todo!()
|
12027 13240 | /// }
|
12028 13241 | ///
|
12029 13242 | /// let config = RestJsonConfig::builder().build();
|
12030 13243 | /// let app = RestJson::builder(config)
|
12031 - | /// .operation_with_defaults(handler)
|
13244 + | /// .output_stream(handler)
|
12032 13245 | /// /* Set other handlers */
|
12033 13246 | /// .build()
|
12034 13247 | /// .unwrap();
|
12035 13248 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
12036 13249 | /// ```
|
12037 13250 | ///
|
12038 - | pub fn operation_with_defaults<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
13251 + | pub fn output_stream<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12039 13252 | where
|
12040 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::OperationWithDefaults, HandlerExtractors>,
|
13253 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::OutputStream, HandlerExtractors>,
|
12041 13254 |
|
12042 13255 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
12043 13256 | RestJson<L>,
|
12044 - | crate::operation_shape::OperationWithDefaults,
|
12045 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::OperationWithDefaults, HandlerType>
|
13257 + | crate::operation_shape::OutputStream,
|
13258 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::OutputStream, HandlerType>
|
12046 13259 | >,
|
12047 13260 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
12048 13261 | RestJson<L>,
|
12049 - | crate::operation_shape::OperationWithDefaults,
|
13262 + | crate::operation_shape::OutputStream,
|
12050 13263 | ModelPl::Output
|
12051 13264 | >,
|
12052 13265 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
12053 13266 | RestJson<L>,
|
12054 - | crate::operation_shape::OperationWithDefaults,
|
13267 + | crate::operation_shape::OutputStream,
|
12055 13268 | <
|
12056 13269 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
12057 13270 | as ::aws_smithy_http_server::plugin::Plugin<
|
12058 13271 | RestJson<L>,
|
12059 - | crate::operation_shape::OperationWithDefaults,
|
13272 + | crate::operation_shape::OutputStream,
|
12060 13273 | ModelPl::Output
|
12061 13274 | >
|
12062 13275 | >::Output
|
12063 13276 | >,
|
12064 13277 |
|
12065 13278 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
12066 13279 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
12067 13280 |
|
12068 13281 | {
|
12069 13282 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
12070 13283 | use ::aws_smithy_http_server::plugin::Plugin;
|
12071 - | let svc = crate::operation_shape::OperationWithDefaults::from_handler(handler);
|
13284 + | let svc = crate::operation_shape::OutputStream::from_handler(handler);
|
12072 13285 | let svc = self.model_plugin.apply(svc);
|
12073 13286 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
12074 13287 | .apply(svc);
|
12075 13288 | let svc = self.http_plugin.apply(svc);
|
12076 - | self.operation_with_defaults_custom(svc)
|
13289 + | self.output_stream_custom(svc)
|
12077 13290 | }
|
12078 13291 |
|
12079 - | /// Sets the [`OperationWithDefaults`](crate::operation_shape::OperationWithDefaults) operation.
|
13292 + | /// Sets the [`OutputStream`](crate::operation_shape::OutputStream) operation.
|
12080 13293 | ///
|
12081 13294 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
12082 13295 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
12083 13296 | ///
|
12084 13297 | /// # Example
|
12085 13298 | ///
|
12086 13299 | /// ```no_run
|
12087 13300 | /// use rest_json::{RestJson, RestJsonConfig};
|
12088 13301 | ///
|
12089 13302 | /// use rest_json::{input, output, error};
|
12090 13303 | ///
|
12091 - | /// async fn handler(input: input::OperationWithDefaultsInput) -> Result<output::OperationWithDefaultsOutput, error::OperationWithDefaultsError> {
|
13304 + | /// async fn handler(input: input::OutputStreamInput) -> Result<output::OutputStreamOutput, error::OutputStreamError> {
|
12092 13305 | /// todo!()
|
12093 13306 | /// }
|
12094 13307 | ///
|
12095 13308 | /// let config = RestJsonConfig::builder().build();
|
12096 13309 | /// let svc = ::tower::util::service_fn(handler);
|
12097 13310 | /// let app = RestJson::builder(config)
|
12098 - | /// .operation_with_defaults_service(svc)
|
13311 + | /// .output_stream_service(svc)
|
12099 13312 | /// /* Set other handlers */
|
12100 13313 | /// .build()
|
12101 13314 | /// .unwrap();
|
12102 13315 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
12103 13316 | /// ```
|
12104 13317 | ///
|
12105 - | pub fn operation_with_defaults_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
13318 + | pub fn output_stream_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12106 13319 | where
|
12107 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::OperationWithDefaults, ServiceExtractors>,
|
13320 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::OutputStream, ServiceExtractors>,
|
12108 13321 |
|
12109 13322 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
12110 13323 | RestJson<L>,
|
12111 - | crate::operation_shape::OperationWithDefaults,
|
12112 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::OperationWithDefaults, S>
|
13324 + | crate::operation_shape::OutputStream,
|
13325 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::OutputStream, S>
|
12113 13326 | >,
|
12114 13327 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
12115 13328 | RestJson<L>,
|
12116 - | crate::operation_shape::OperationWithDefaults,
|
13329 + | crate::operation_shape::OutputStream,
|
12117 13330 | ModelPl::Output
|
12118 13331 | >,
|
12119 13332 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
12120 13333 | RestJson<L>,
|
12121 - | crate::operation_shape::OperationWithDefaults,
|
13334 + | crate::operation_shape::OutputStream,
|
12122 13335 | <
|
12123 13336 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
12124 13337 | as ::aws_smithy_http_server::plugin::Plugin<
|
12125 13338 | RestJson<L>,
|
12126 - | crate::operation_shape::OperationWithDefaults,
|
13339 + | crate::operation_shape::OutputStream,
|
12127 13340 | ModelPl::Output
|
12128 13341 | >
|
12129 13342 | >::Output
|
12130 13343 | >,
|
12131 13344 |
|
12132 13345 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
12133 13346 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
12134 13347 |
|
12135 13348 | {
|
12136 13349 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
12137 13350 | use ::aws_smithy_http_server::plugin::Plugin;
|
12138 - | let svc = crate::operation_shape::OperationWithDefaults::from_service(service);
|
13351 + | let svc = crate::operation_shape::OutputStream::from_service(service);
|
12139 13352 | let svc = self.model_plugin.apply(svc);
|
12140 13353 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
12141 13354 | .apply(svc);
|
12142 13355 | let svc = self.http_plugin.apply(svc);
|
12143 - | self.operation_with_defaults_custom(svc)
|
13356 + | self.output_stream_custom(svc)
|
12144 13357 | }
|
12145 13358 |
|
12146 - | /// Sets the [`OperationWithDefaults`](crate::operation_shape::OperationWithDefaults) to a custom [`Service`](tower::Service).
|
13359 + | /// Sets the [`OutputStream`](crate::operation_shape::OutputStream) to a custom [`Service`](tower::Service).
|
12147 13360 | /// not constrained by the Smithy contract.
|
12148 - | fn operation_with_defaults_custom<S>(mut self, svc: S) -> Self
|
13361 + | fn output_stream_custom<S>(mut self, svc: S) -> Self
|
12149 13362 | where
|
12150 13363 | S: ::tower::Service<
|
12151 13364 | ::http_1x::Request<Body>,
|
12152 13365 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
12153 13366 | Error = ::std::convert::Infallible,
|
12154 13367 | > + Clone
|
12155 13368 | + Send
|
12156 13369 | + 'static,
|
12157 13370 | S::Future: Send + 'static,
|
12158 13371 | {
|
12159 - | self.operation_with_defaults = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
13372 + | self.output_stream = Some(::aws_smithy_http_server::routing::Route::new(svc));
|
12160 13373 | self
|
12161 13374 | }
|
12162 13375 |
|
12163 - | /// Sets the [`OperationWithNestedStructure`](crate::operation_shape::OperationWithNestedStructure) operation.
|
13376 + | /// Sets the [`OutputStreamWithInitialResponse`](crate::operation_shape::OutputStreamWithInitialResponse) operation.
|
12164 13377 | ///
|
12165 13378 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
12166 13379 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
12167 13380 | ///
|
12168 13381 | /// # Example
|
12169 13382 | ///
|
12170 13383 | /// ```no_run
|
12171 13384 | /// use rest_json::{RestJson, RestJsonConfig};
|
12172 13385 | ///
|
12173 13386 | /// use rest_json::{input, output, error};
|
12174 13387 | ///
|
12175 - | /// async fn handler(input: input::OperationWithNestedStructureInput) -> Result<output::OperationWithNestedStructureOutput, error::OperationWithNestedStructureError> {
|
13388 + | /// async fn handler(input: input::OutputStreamWithInitialResponseInput) -> Result<output::OutputStreamWithInitialResponseOutput, error::OutputStreamWithInitialResponseError> {
|
12176 13389 | /// todo!()
|
12177 13390 | /// }
|
12178 13391 | ///
|
12179 13392 | /// let config = RestJsonConfig::builder().build();
|
12180 13393 | /// let app = RestJson::builder(config)
|
12181 - | /// .operation_with_nested_structure(handler)
|
13394 + | /// .output_stream_with_initial_response(handler)
|
12182 13395 | /// /* Set other handlers */
|
12183 13396 | /// .build()
|
12184 13397 | /// .unwrap();
|
12185 13398 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
12186 13399 | /// ```
|
12187 13400 | ///
|
12188 - | pub fn operation_with_nested_structure<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
13401 + | pub fn output_stream_with_initial_response<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
|
12189 13402 | where
|
12190 - | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::OperationWithNestedStructure, HandlerExtractors>,
|
13403 + | HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::OutputStreamWithInitialResponse, HandlerExtractors>,
|
12191 13404 |
|
12192 13405 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
12193 13406 | RestJson<L>,
|
12194 - | crate::operation_shape::OperationWithNestedStructure,
|
12195 - | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::OperationWithNestedStructure, HandlerType>
|
13407 + | crate::operation_shape::OutputStreamWithInitialResponse,
|
13408 + | ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::OutputStreamWithInitialResponse, HandlerType>
|
12196 13409 | >,
|
12197 13410 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
12198 13411 | RestJson<L>,
|
12199 - | crate::operation_shape::OperationWithNestedStructure,
|
13412 + | crate::operation_shape::OutputStreamWithInitialResponse,
|
12200 13413 | ModelPl::Output
|
12201 13414 | >,
|
12202 13415 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
12203 13416 | RestJson<L>,
|
12204 - | crate::operation_shape::OperationWithNestedStructure,
|
13417 + | crate::operation_shape::OutputStreamWithInitialResponse,
|
12205 13418 | <
|
12206 13419 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
12207 13420 | as ::aws_smithy_http_server::plugin::Plugin<
|
12208 13421 | RestJson<L>,
|
12209 - | crate::operation_shape::OperationWithNestedStructure,
|
13422 + | crate::operation_shape::OutputStreamWithInitialResponse,
|
12210 13423 | ModelPl::Output
|
12211 13424 | >
|
12212 13425 | >::Output
|
12213 13426 | >,
|
12214 13427 |
|
12215 13428 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
12216 13429 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
12217 13430 |
|
12218 13431 | {
|
12219 13432 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
12220 13433 | use ::aws_smithy_http_server::plugin::Plugin;
|
12221 - | let svc = crate::operation_shape::OperationWithNestedStructure::from_handler(handler);
|
13434 + | let svc = crate::operation_shape::OutputStreamWithInitialResponse::from_handler(handler);
|
12222 13435 | let svc = self.model_plugin.apply(svc);
|
12223 13436 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
12224 13437 | .apply(svc);
|
12225 13438 | let svc = self.http_plugin.apply(svc);
|
12226 - | self.operation_with_nested_structure_custom(svc)
|
13439 + | self.output_stream_with_initial_response_custom(svc)
|
12227 13440 | }
|
12228 13441 |
|
12229 - | /// Sets the [`OperationWithNestedStructure`](crate::operation_shape::OperationWithNestedStructure) operation.
|
13442 + | /// Sets the [`OutputStreamWithInitialResponse`](crate::operation_shape::OutputStreamWithInitialResponse) operation.
|
12230 13443 | ///
|
12231 13444 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
12232 13445 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
12233 13446 | ///
|
12234 13447 | /// # Example
|
12235 13448 | ///
|
12236 13449 | /// ```no_run
|
12237 13450 | /// use rest_json::{RestJson, RestJsonConfig};
|
12238 13451 | ///
|
12239 13452 | /// use rest_json::{input, output, error};
|
12240 13453 | ///
|
12241 - | /// async fn handler(input: input::OperationWithNestedStructureInput) -> Result<output::OperationWithNestedStructureOutput, error::OperationWithNestedStructureError> {
|
13454 + | /// async fn handler(input: input::OutputStreamWithInitialResponseInput) -> Result<output::OutputStreamWithInitialResponseOutput, error::OutputStreamWithInitialResponseError> {
|
12242 13455 | /// todo!()
|
12243 13456 | /// }
|
12244 13457 | ///
|
12245 13458 | /// let config = RestJsonConfig::builder().build();
|
12246 13459 | /// let svc = ::tower::util::service_fn(handler);
|
12247 13460 | /// let app = RestJson::builder(config)
|
12248 - | /// .operation_with_nested_structure_service(svc)
|
13461 + | /// .output_stream_with_initial_response_service(svc)
|
12249 13462 | /// /* Set other handlers */
|
12250 13463 | /// .build()
|
12251 13464 | /// .unwrap();
|
12252 13465 | /// # let app: RestJson<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
|
12253 13466 | /// ```
|
12254 13467 | ///
|
12255 - | pub fn operation_with_nested_structure_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
13468 + | pub fn output_stream_with_initial_response_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
|
12256 13469 | where
|
12257 - | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::OperationWithNestedStructure, ServiceExtractors>,
|
13470 + | S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::OutputStreamWithInitialResponse, ServiceExtractors>,
|
12258 13471 |
|
12259 13472 | ModelPl: ::aws_smithy_http_server::plugin::Plugin<
|
12260 13473 | RestJson<L>,
|
12261 - | crate::operation_shape::OperationWithNestedStructure,
|
12262 - | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::OperationWithNestedStructure, S>
|
13474 + | crate::operation_shape::OutputStreamWithInitialResponse,
|
13475 + | ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::OutputStreamWithInitialResponse, S>
|
12263 13476 | >,
|
12264 13477 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
|
12265 13478 | RestJson<L>,
|
12266 - | crate::operation_shape::OperationWithNestedStructure,
|
13479 + | crate::operation_shape::OutputStreamWithInitialResponse,
|
12267 13480 | ModelPl::Output
|
12268 13481 | >,
|
12269 13482 | HttpPl: ::aws_smithy_http_server::plugin::Plugin<
|
12270 13483 | RestJson<L>,
|
12271 - | crate::operation_shape::OperationWithNestedStructure,
|
13484 + | crate::operation_shape::OutputStreamWithInitialResponse,
|
12272 13485 | <
|
12273 13486 | ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
|
12274 13487 | as ::aws_smithy_http_server::plugin::Plugin<
|
12275 13488 | RestJson<L>,
|
12276 - | crate::operation_shape::OperationWithNestedStructure,
|
13489 + | crate::operation_shape::OutputStreamWithInitialResponse,
|
12277 13490 | ModelPl::Output
|
12278 13491 | >
|
12279 13492 | >::Output
|
12280 13493 | >,
|
12281 13494 |
|
12282 13495 | HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
|
12283 13496 | <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
|
12284 13497 |
|
12285 13498 | {
|
12286 13499 | use ::aws_smithy_http_server::operation::OperationShapeExt;
|
12287 13500 | use ::aws_smithy_http_server::plugin::Plugin;
|
12288 - | let svc = crate::operation_shape::OperationWithNestedStructure::from_service(service);
|
13501 + | let svc = crate::operation_shape::OutputStreamWithInitialResponse::from_service(service);
|
12289 13502 | let svc = self.model_plugin.apply(svc);
|
12290 13503 | let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
|
12291 13504 | .apply(svc);
|
12292 13505 | let svc = self.http_plugin.apply(svc);
|
12293 - | self.operation_with_nested_structure_custom(svc)
|
13506 + | self.output_stream_with_initial_response_custom(svc)
|
12294 13507 | }
|
12295 13508 |
|
12296 - | /// Sets the [`OperationWithNestedStructure`](crate::operation_shape::OperationWithNestedStructure) to a custom [`Service`](tower::Service).
|
13509 + | /// Sets the [`OutputStreamWithInitialResponse`](crate::operation_shape::OutputStreamWithInitialResponse) to a custom [`Service`](tower::Service).
|
12297 13510 | /// not constrained by the Smithy contract.
|
12298 - | fn operation_with_nested_structure_custom<S>(mut self, svc: S) -> Self
|
13511 + | fn output_stream_with_initial_response_custom<S>(mut self, svc: S) -> Self
|
12299 13512 | where
|
12300 13513 | S: ::tower::Service<
|
12301 13514 | ::http_1x::Request<Body>,
|
12302 13515 | Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
|
12303 13516 | Error = ::std::convert::Infallible,
|
12304 13517 | > + Clone
|
12305 13518 | + Send
|
12306 13519 | + 'static,
|
12307 13520 | S::Future: Send + 'static,
|
12308 13521 | {
|
12309 - | self.operation_with_nested_structure =
|
13522 + | self.output_stream_with_initial_response =
|
12310 13523 | Some(::aws_smithy_http_server::routing::Route::new(svc));
|
12311 13524 | self
|
12312 13525 | }
|
12313 13526 |
|
12314 13527 | /// Sets the [`PostPlayerAction`](crate::operation_shape::PostPlayerAction) operation.
|
12315 13528 | ///
|
12316 13529 | /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
|
12317 13530 | /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
|
12318 13531 | ///
|
12319 13532 | /// # Example
|