MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / list_views

Method list_views

atomic-cli/src/service/mod.rs:1579–1595  ·  view source on GitHub ↗
(&self, request: pb::ListViewsRequest)

Source from the content-addressed store, hash-verified

1577
1578impl Service {
1579 pub fn list_views(&self, request: pb::ListViewsRequest) -> CliResult<pb::ListViewsResponse> {
1580 self.call(move |backend| async move {
1581 match backend {
1582 Backend::Local(state) => services_query::ViewImpl { state }
1583 .list_views(Request::new(request))
1584 .await
1585 .map(|response| response.into_inner()),
1586 Backend::Reactor(channel) => {
1587 let mut views = pb::view_service_client::ViewServiceClient::new(channel);
1588 views
1589 .list_views(request)
1590 .await
1591 .map(|response| response.into_inner())
1592 }
1593 }
1594 })
1595 }
1596
1597 pub fn create_view(&self, request: pb::CreateViewRequest) -> CliResult<pb::CreateViewResponse> {
1598 self.call(move |backend| async move {

Calls 2

callMethod · 0.45
into_innerMethod · 0.45