@@ -264,18 +264,46 @@ Which means that it is a wrapper around pure function that might fail.
264
264
We also added a lot of useful methods for this container,
265
265
so you can work easily with it:
266
266
267
- - :meth: `returns.context.requires_context.RequiresContextResult.from_typecast `
267
+ .. currentmodule :: returns.context.requires_context_result
268
+
269
+ - :meth: `~RequiresContextResult.from_typecast `
268
270
turns accidental ``RequiresContext[env, Result[a, b]] `` into
269
271
full-featured ``RequiresContextResult[env, a, b] ``
270
- - :meth: `returns.context.requires_context. RequiresContextResult.bind_result `
272
+ - :meth: `~ RequiresContextResult.bind_result `
271
273
allows to bind functions that return ``Result `` with just one call
272
- - :meth: returns.context.requires_context. RequiresContextResult.bind_context`
274
+ - :meth: ` ~ RequiresContextResult.bind_context `
273
275
allows to bind functions that return ``RequiresContext `` easily
274
276
- There are also several useful contructors from any possible type
275
277
276
278
Use it when you work with pure context-related functions that might fail.
277
279
278
280
281
+ RequiresContextIOResult container
282
+ ---------------------------------
283
+
284
+ This container is a combintaion of ``RequiresContext[env, IOResult[a, b]] ``.
285
+ Which means that it is a wrapper around impure function that might fail.
286
+
287
+ We also added a lot of useful methods for this container,
288
+ so you can work easily with it:
289
+
290
+ .. currentmodule :: returns.context.requires_context_io_result
291
+
292
+ - :meth: `~RequiresContextIOResult.from_typecast `
293
+ turns accidental ``RequiresContext[env, IOResult[a, b]] `` into
294
+ full-featured ``RequiresContextIOResult[env, a, b] ``
295
+ - :meth: `~RequiresContextIOResult.bind_result `
296
+ allows to bind functions that return ``Result `` with just one call
297
+ - :meth: `~RequiresContextIOResult.bind_ioresult `
298
+ allows to bind functions that return ``IOResult `` with just one call
299
+ - :meth: `~RequiresContextIOResult.bind_context `
300
+ allows to bind functions that return ``RequiresContext `` easily
301
+ - There are also several useful contructors from any possible type
302
+
303
+ Use it when you work with impure context-related functions that might fail.
304
+ This is basically **the main type ** that is going to be used in most apps.
305
+
306
+
279
307
FAQ
280
308
---
281
309
@@ -384,7 +412,7 @@ RequiresContextResult
384
412
:members:
385
413
386
414
RequiresContextIOResult
387
- ~~~~~~~~~~~~~~~~~~~~~
415
+ ~~~~~~~~~~~~~~~~~~~~~~~
388
416
389
417
.. autoclasstree :: returns.context.requires_context_io_result
390
418
0 commit comments