# `Estructura.LazyMap`
[🔗](https://github.com/am-kantox/estructura/blob/v1.13.0/lib/estructura/lazy_map.ex#L1)

The implementation of lazy map implementing lazy `Access` for its keys.

`Estructura.LazyMap` is backed by the “raw” object and a key-value pairs
  where values might be instances of `Estructura.Lazy`. If this is a case,
  they will be accessed through `Lazy` implementation.

Values might be also raw values, which makes `LazyMap` a drop-in replacement
  of standard _Elixir_ maps, assuming they are accessed through `Access`
  only (e. g. `map[:key]` and not `map.key`.)

# `t`

```elixir
@type t() :: %Estructura.LazyMap{__lazy_data__: term(), data: map()}
```

# `fetch_all`
*since 0.4.1* 

```elixir
@spec fetch_all(t()) :: t()
```

Eagerly instantiates the data

# `keys`
*since 0.4.1* 

```elixir
@spec keys(t()) :: [Map.key()]
```

Returns all the keys of the underlying map

# `new`

Creates new instance of `LazyMap` with a second parameter being a backed up object,
  which would be used for lazy retrieving data for values, when value is an instance
  of `Estructura.Lazy`.

## Examples

    iex> lm = Estructura.LazyMap.new(
    ...>   [int: Estructura.Lazy.new(&Estructura.LazyInst.parse_int/1)], "42")
    ...> get_in lm, [:int]
    42

---

*Consult [api-reference.md](api-reference.md) for complete listing*
