Skip to content

Commit

Permalink
docs: Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb-leinz committed Oct 21, 2024
1 parent 084aee3 commit 3e4153f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let atlas_client = Client::from_config(atlas_config);
// Query Freedom for a list of all Satellites, printing the names of the satellite which
// passed deserialization
// Query Freedom for a list of all Satellites, printing the names of the
// satellite which passed deserialization
atlas_client.get_satellites()
.collect::<Vec<_>>()
.await
Expand Down Expand Up @@ -123,8 +123,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {

### Container

There is however another complexity that exists in the return types of API
methods. You will note that what is returned by a given method call is of type
You will note that what is returned by the `get_` methods of the API is of type
`Self::Container<T>` rather than simply type `T`. This complexity is required
since there are multiple API clients, most notably the default [`Client`] and
the `CachingClient` (available via the `caching` feature flag). The caching
Expand All @@ -135,7 +134,7 @@ cache. This complexity will be mostly transparent to the caller, since the
container is required to implement [`Deref<T>`](std::ops::Deref).

If however you need to mutate the data after receiving it, call the
`FreedomApiContainer::into_inner` method on the returned type to get an owned
`Container::into_inner` method on the returned type to get an owned
version of the wrapped type.

```rust, ignore
Expand Down

0 comments on commit 3e4153f

Please sign in to comment.