Struct gapi_grpc::google::example::library::v1::library_service_client::LibraryServiceClient[][src]

pub struct LibraryServiceClient<T> { /* fields omitted */ }

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:

Implementations

impl LibraryServiceClient<Channel>[src]

pub async fn connect<D>(dst: D) -> Result<Self, Error> where
    D: TryInto<Endpoint>,
    D::Error: Into<StdError>, 
[src]

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]

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]

Creates a shelf, and returns the new Shelf.

pub async fn get_shelf(
    &mut self,
    request: impl IntoRequest<GetShelfRequest>
) -> Result<Response<Shelf>, Status>
[src]

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]

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]

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]

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]

Creates a book, and returns the new Book.

pub async fn get_book(
    &mut self,
    request: impl IntoRequest<GetBookRequest>
) -> Result<Response<Book>, Status>
[src]

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]

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]

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]

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]

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]

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

impl<T> Sync for LibraryServiceClient<T> where
    T: Sync

impl<T> Unpin for LibraryServiceClient<T> where
    T: Unpin

impl<T> !UnwindSafe for LibraryServiceClient<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]