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

Method list_views

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

Source from the content-addressed store, hash-verified

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

Calls 2

callMethod · 0.45
into_innerMethod · 0.45