Rustlings tests1: Introducing the assert! macro
lessonDuration 18sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/tests/README.md) for this exercise.
Browse
Find courses, lessons, articles, talks, and podcasts.
182 resources
Showing 73–96 · Page 4 of 8
lessonDuration 18sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/tests/README.md) for this exercise.
lessonDuration 39sFree
lessonDuration 2m 11sFree
lessonDuration 17sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/primitive_types/README.md) for this exercise.
lessonDuration 24sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/strings/README.md) for this exercise. String literals are a bit special when it comes to Strings and string slices (&str). String literals are string slices that refer to “preallocated text” that is stored in read-only memory as part of the executable.
lessonDuration 1m 10sFree
Paginate can be used with options to move forward or backward in the list of results. We can also limit or expand the number of results we get in a Page. ``` Paginate(Match(Index("all_customers"))) ``` ``` Paginate(Match(Index("all_customers")), { size: 2 }) ``` ``` Paginate( Match(Index("all_customers")), { size: 2, after: Ref(Collection("customers"), "244075679455381001) } ) ```
lessonDuration 1m 46sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/clippy/README.md) for this exercise.
lessonDuration 1m 35sFree
The FaunaDB CLI is distributed on NPM and includes an interactive shell as well as the ability to send queries from a file. ``` npm i -g fauna-shell fauna cloud-login fauna -h fauna list-databases ``` open a shell to a database: ``` fauna shell test-demo ``` ``` Match(Index("all_customers")) ``` ``` Paginate(Match(Index("all_customers"))) ``` Running queries from a file ``` fauna eval test-demo --file=./fauna.fql ```
lessonDuration 2m 21sFree
FQL is the main query language for interacting with FaunaDB. It supports all JSON types, plus some additional types like Ref, Date, and Set. FQL is based in expressions and as such everything returns a value. This makes it easy to compose logic into larger queries. Code shown in the shell: ``` Match(Index("all_customers")) ```
lessonDuration 6m 17sFree
We take a set of DynamoDB queries that insert, update, and query for TODOs and replace the entire backend of our GraphQL API which is currently using FaunaDB. We cover DynamoDB operation ReturnValues for put, update, and query operations, implementing transformer functions to coordinate the stored representation in DynamoDB with your business objects, and then we get into Netlify. Netlify's environment variables don't allow us to use AWS_ACCESS_KEY_ID as an environment variable name. Once we fix that, we set up a pull request on GitHub, which results in a Deploy Preview that includes our new GraphQL function deployment!
lessonDuration 49sFree
FQL Page objects have additional fields like before, and data, that may make it seem like you need to Select to get at the underlying array of results. However, FQL supports passing Page objects directly to functions that operate on arrays and the function will transparently operate on the contained data field. ``` Paginate(Match(Index("all_customers"))) ``` ``` Drop(1, Paginate(Match(Index("all_customers")))) ``` ``` Take(1, Paginate(Match(Index("all_customers")))) ```
lessonDuration 1m 41sFree
We set up the build command, deployment directory, and other necessities to get our Gatsby site auto-deploying on commit to Netlify.
lessonDuration 47sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/primitive_types/README.md) for this exercise.
lessonDuration 35sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/primitive_types/README.md) for this exercise.
lessonDuration 22sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/move_semantics/README.md) for this exercise.
lessonDuration 55sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/move_semantics/README.md) for this exercise. [`push`](https://doc.rust-lang.org/std/vec/struct.Vec.html#method.push) requires a mutable references to `self`: the vector in question. ```rust pub fn push(&mut self, value: T) ```
lessonDuration 24sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/modules/README.md) for this exercise.
lessonDuration 49sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/macros/README.md) for this exercise.
lessonDuration 33sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/macros/README.md) for this exercise.
lessonDuration 2m 12sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/standard_library_types/README.md) for this exercise.
lessonDuration 1m 28sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/if/README.md) for this exercise.
lessonDuration 1m 32sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/generics/README.md) for this exercise.
lessonDuration 26sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/generics/README.md) for this exercise.
lessonDuration 43sFree
[README](https://github.com/ChristopherBiscardi/rustlings/blob/egghead/exercises/functions/README.md) for this exercise.