Struct gapi_grpc::google::example::library::v1::library_service_client::LibraryServiceClient [−][src]
This API represents a simple digital library. It lets you manage Shelf resources and Book resources in the library. It defines the following resource model:
-
The API has a collection of [Shelf][google.example.library.v1.Shelf] resources, named
shelves/*
-
Each Shelf has a collection of [Book][google.example.library.v1.Book] resources, named
shelves/*/books/*
Implementations
impl LibraryServiceClient<Channel>
[src]
pub async fn connect<D>(dst: D) -> Result<Self, Error> where
D: TryInto<Endpoint>,
D::Error: Into<StdError>,
[src]
D: TryInto<Endpoint>,
D::Error: Into<StdError>,
Attempt to create a new client by connecting to a given endpoint.
impl<T> LibraryServiceClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
[src]
T: GrpcService<BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
[src]
pub fn with_interceptor(inner: T, interceptor: impl Into<Interceptor>) -> Self
[src]
pub async fn create_shelf(
&mut self,
request: impl IntoRequest<CreateShelfRequest>
) -> Result<Response<Shelf>, Status>
[src]
&mut self,
request: impl IntoRequest<CreateShelfRequest>
) -> Result<Response<Shelf>, Status>
Creates a shelf, and returns the new Shelf.
pub async fn get_shelf(
&mut self,
request: impl IntoRequest<GetShelfRequest>
) -> Result<Response<Shelf>, Status>
[src]
&mut self,
request: impl IntoRequest<GetShelfRequest>
) -> Result<Response<Shelf>, Status>
Gets a shelf. Returns NOT_FOUND if the shelf does not exist.
pub async fn list_shelves(
&mut self,
request: impl IntoRequest<ListShelvesRequest>
) -> Result<Response<ListShelvesResponse>, Status>
[src]
&mut self,
request: impl IntoRequest<ListShelvesRequest>
) -> Result<Response<ListShelvesResponse>, Status>
Lists shelves. The order is unspecified but deterministic. Newly created shelves will not necessarily be added to the end of this list.
pub async fn delete_shelf(
&mut self,
request: impl IntoRequest<DeleteShelfRequest>
) -> Result<Response<()>, Status>
[src]
&mut self,
request: impl IntoRequest<DeleteShelfRequest>
) -> Result<Response<()>, Status>
Deletes a shelf. Returns NOT_FOUND if the shelf does not exist.
pub async fn merge_shelves(
&mut self,
request: impl IntoRequest<MergeShelvesRequest>
) -> Result<Response<Shelf>, Status>
[src]
&mut self,
request: impl IntoRequest<MergeShelvesRequest>
) -> Result<Response<Shelf>, Status>
Merges two shelves by adding all books from the shelf named
other_shelf_name
to shelf name
, and deletes
other_shelf_name
. Returns the updated shelf.
The book ids of the moved books may not be the same as the original books.
Returns NOT_FOUND if either shelf does not exist. This call is a no-op if the specified shelves are the same.
pub async fn create_book(
&mut self,
request: impl IntoRequest<CreateBookRequest>
) -> Result<Response<Book>, Status>
[src]
&mut self,
request: impl IntoRequest<CreateBookRequest>
) -> Result<Response<Book>, Status>
Creates a book, and returns the new Book.
pub async fn get_book(
&mut self,
request: impl IntoRequest<GetBookRequest>
) -> Result<Response<Book>, Status>
[src]
&mut self,
request: impl IntoRequest<GetBookRequest>
) -> Result<Response<Book>, Status>
Gets a book. Returns NOT_FOUND if the book does not exist.
pub async fn list_books(
&mut self,
request: impl IntoRequest<ListBooksRequest>
) -> Result<Response<ListBooksResponse>, Status>
[src]
&mut self,
request: impl IntoRequest<ListBooksRequest>
) -> Result<Response<ListBooksResponse>, Status>
Lists books in a shelf. The order is unspecified but deterministic. Newly created books will not necessarily be added to the end of this list. Returns NOT_FOUND if the shelf does not exist.
pub async fn delete_book(
&mut self,
request: impl IntoRequest<DeleteBookRequest>
) -> Result<Response<()>, Status>
[src]
&mut self,
request: impl IntoRequest<DeleteBookRequest>
) -> Result<Response<()>, Status>
Deletes a book. Returns NOT_FOUND if the book does not exist.
pub async fn update_book(
&mut self,
request: impl IntoRequest<UpdateBookRequest>
) -> Result<Response<Book>, Status>
[src]
&mut self,
request: impl IntoRequest<UpdateBookRequest>
) -> Result<Response<Book>, Status>
Updates a book. Returns INVALID_ARGUMENT if the name of the book is non-empty and does not equal the existing name.
pub async fn move_book(
&mut self,
request: impl IntoRequest<MoveBookRequest>
) -> Result<Response<Book>, Status>
[src]
&mut self,
request: impl IntoRequest<MoveBookRequest>
) -> Result<Response<Book>, Status>
Moves a book to another shelf, and returns the new book. The book id of the new book may not be the same as the original book.
Trait Implementations
impl<T: Clone> Clone for LibraryServiceClient<T>
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Debug for LibraryServiceClient<T>
[src]
Auto Trait Implementations
impl<T> !RefUnwindSafe for LibraryServiceClient<T>
impl<T> Send for LibraryServiceClient<T> where
T: Send,
T: Send,
impl<T> Sync for LibraryServiceClient<T> where
T: Sync,
T: Sync,
impl<T> Unpin for LibraryServiceClient<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for LibraryServiceClient<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoRequest<T> for T
[src]
pub fn into_request(self) -> Request<T>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,