State<K, A, E>Represents the internal state of an RcMap, which can be either Open (active) or Closed (shutdown and no longer accepting operations).
When to use
Use when typing code that inspects an RcMap's state field and narrows
between open and closed lifecycle states.
export type type State<K, A, E> = State.Open<K, A, E> | State.ClosedRepresents the internal state of an RcMap, which can be either Open (active)
or Closed (shutdown and no longer accepting operations).
When to use
Use when typing code that inspects an RcMap's state field and narrows
between open and closed lifecycle states.
Namespace containing the internal state types for RcMap.
When to use
Use when referring to the concrete open, closed, and entry state shapes used
by RcMap.
State<function (type parameter) K in type State<K, A, E>K, function (type parameter) A in type State<K, A, E>A, function (type parameter) E in type State<K, A, E>E> = State.interface State<K, A, E>.Open<K, A, E>Represents the open/active state of an RcMap, containing the actual
resource map that stores entries.
When to use
Use when handling an RcMap that can still accept operations and contains
stored entries.
Open<function (type parameter) K in type State<K, A, E>K, function (type parameter) A in type State<K, A, E>A, function (type parameter) E in type State<K, A, E>E> | State.interface State<K, A, E>.ClosedRepresents the closed state of an RcMap, indicating that the map has been
shut down and will no longer accept new operations.
When to use
Use when handling an RcMap after its owning scope has closed.
Closed
/**
* Namespace containing the internal state types for RcMap.
*
* **When to use**
*
* Use when referring to the concrete open, closed, and entry state shapes used
* by `RcMap`.
*
* @since 4.0.0
*/
export declare namespace State {
/**
* Represents the open/active state of an RcMap, containing the actual
* resource map that stores entries.
*
* **When to use**
*
* Use when handling an `RcMap` that can still accept operations and contains
* stored entries.
*
* @category models
* @since 4.0.0
*/
export interface interface State<K, A, E>.Open<K, A, E>Represents the open/active state of an RcMap, containing the actual
resource map that stores entries.
When to use
Use when handling an RcMap that can still accept operations and contains
stored entries.
Open<function (type parameter) K in Open<K, A, E>K, function (type parameter) A in Open<K, A, E>A, function (type parameter) E in Open<K, A, E>E> {
readonly State<K, A, E>.Open<K, A, E>._tag: "Open"_tag: "Open"
readonly State<K, A, E>.Open<K, A, E>.map: MutableHashMap.MutableHashMap<K, Entry<A, E>>(property) State<K, A, E>.Open<K, A, E>.map: {
backing: Map<K, V>;
buckets: Map<number, NonEmptyArray<K>>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
map: import MutableHashMapMutableHashMap.type MutableHashMap.MutableHashMap = /*unresolved*/ anyMutableHashMap<function (type parameter) K in Open<K, A, E>K, interface State<K, A, E>.Entry<A, E>Represents an individual entry in the RcMap, containing the resource's
metadata including reference count, expiration time, and lifecycle management.
When to use
Use when inspecting the stored resource, reference count, and idle lifecycle
metadata for a single key.
Entry<function (type parameter) A in Open<K, A, E>A, function (type parameter) E in Open<K, A, E>E>>
}
/**
* Represents the closed state of an RcMap, indicating that the map has been
* shut down and will no longer accept new operations.
*
* **When to use**
*
* Use when handling an `RcMap` after its owning scope has closed.
*
* @category models
* @since 4.0.0
*/
export interface interface State<K, A, E>.ClosedRepresents the closed state of an RcMap, indicating that the map has been
shut down and will no longer accept new operations.
When to use
Use when handling an RcMap after its owning scope has closed.
Closed {
readonly State<K, A, E>.Closed._tag: "Closed"_tag: "Closed"
}
/**
* Represents an individual entry in the RcMap, containing the resource's
* metadata including reference count, expiration time, and lifecycle management.
*
* **When to use**
*
* Use when inspecting the stored resource, reference count, and idle lifecycle
* metadata for a single key.
*
* @category models
* @since 4.0.0
*/
export interface interface State<K, A, E>.Entry<A, E>Represents an individual entry in the RcMap, containing the resource's
metadata including reference count, expiration time, and lifecycle management.
When to use
Use when inspecting the stored resource, reference count, and idle lifecycle
metadata for a single key.
Entry<function (type parameter) A in Entry<A, E>A, function (type parameter) E in Entry<A, E>E> {
readonly State<K, A, E>.Entry<A, E>.deferred: Deferred.Deferred<A, E>(property) State<K, A, E>.Entry<A, E>.deferred: {
effect: Effect<A, E>;
resumes: Array<(effect: Effect<A, E>) => void> | undefined;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
deferred: import DeferredDeferred.type Deferred.Deferred = /*unresolved*/ anyDeferred<function (type parameter) A in Entry<A, E>A, function (type parameter) E in Entry<A, E>E>
readonly State<K, A, E>.Entry<A, E>.scope: Scope.Closeable(property) State<K, A, E>.Entry<A, E>.scope: {
strategy: "sequential" | "parallel";
state: State.Open | State.Closed | State.Empty;
}
scope: import ScopeScope.Closeable
readonly State<K, A, E>.Entry<A, E>.finalizer: Effect.Effect<void>(property) State<K, A, E>.Entry<A, E>.finalizer: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
finalizer: import EffectEffect.type Effect.Effect = /*unresolved*/ anyEffect<void>
readonly State<K, A, E>.Entry<A, E>.idleTimeToLive: Duration.Duration(property) State<K, A, E>.Entry<A, E>.idleTimeToLive: {
value: DurationValue;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
idleTimeToLive: import DurationDuration.type Duration.Duration = /*unresolved*/ anyDuration
State<K, A, E>.Entry<A, E>.fiber: Fiber.Fiber<void> | undefinedfiber: import FiberFiber.type Fiber.Fiber = /*unresolved*/ anyFiber<void> | undefined
State<K, A, E>.Entry<A, E>.expiresAt: numberexpiresAt: number
State<K, A, E>.Entry<A, E>.refCount: numberrefCount: number
}
}