scope-functions

Crates.ioscope-functions
lib.rsscope-functions
version1.1.0
sourcesrc
created_at2024-06-16 03:38:47.29795
updated_at2024-06-17 03:02:45.465879
descriptionThis crate provides Kotlin-inspired scope functions for use in almost any situation.
homepage
repositoryhttps://github.com/apsoyka/scope-functions
max_upload_size
id1273249
size13,532
Anastasiya Polina Soyka (apsoyka)

documentation

README

scope-functions is a Rust crate that provides several Kotlin-inspired scope functions for use in almost any situation.

Introduction

A scope function is a function whose sole purpose is to execute a block of code within the context of an object. Such functions accept a higher-order function, or closure, as their sole argument, and allow the programmer to perform operations on that object within a separate scope.

For example, a scope function may be used to perform an extra operation on an object before assigning it to a variable. This crate provides three types of scope functions: apply, run, and with.

Function Selection

Function Return Value

run | Closure Result with | Closure Result apply | Context Object

Commit count: 6

cargo fmt