Expand description
The ulo core: keys, bindings, injection points, scopes, executions, modules, lifecycle,
errors, and the enhancer traits a transport implements against.
The core has no async runtime. It uses std::future, the BoxFuture alias, a pluggable
Timer and a pluggable Spawn, the two together a Runtime; transports and runtime
adapters bring the executor, sockets, timers and signals.
Every macro expands to calls on the value-level API re-exported here, which integration
crates call directly.
The macros name this crate as ::ulo. A crate that depends on it under another name,
framework = { package = "ulo", .. } in its manifest, writes extern crate framework as ulo;
at its root for any ulo macro to expand.
Re-exports§
pub use app::App;pub use app::AppBuilder;pub use app::AppHandle;pub use app::Connected;pub use app::Phase;pub use app::Wired;pub use scope::AllowedIn;pub use scope::HookCapable;pub use scope::Scope;pub use scope::ScopeKind;pub use testing::TestApp;
Modules§
- app
- The application: the graph plus the singleton store, moving through typestates
Wired→Connected→Bound→ serving → closed (§2, §9.4). - handle
- The binding-handle typestate: the state markers
Handle’s parameters take and the traits that decide which methods exist in each state (§9.1). Also the marks onContribute’s last parameter:Plainon the buildercontributereturns,Enhanceron the oneenhancerreturns, which has noqualified. - panic
- The process’s panic hook. Rust runs the installed hook for every panic, on the panicking thread,
before the unwinding reaches any
catch_unwind, so what ulo redacts in a caught panic reaches its reports and never what the hook already printed; the default hook prints the raw message.install_redacting_hookreplaces it with one that prints the message redacted. ulo never installs it: the hook is the process’s, and a library replacing it would replace the application’s own. - scope
- Scope markers and the bounds the compiler checks against them (§3.3).
- secrets
- For the authors of configuration loaders and of module settings: the two ways a secret that reaches a module through its configuration is kept out of the reports the graph writes.
- testing
- Building a module graph with some bindings overridden, without editing the production modules (§11).
Macros§
- hooks
Construct::hooksfilled by autoref probing: each of the five hooks registers when the concrete type implements its trait and is a no-op otherwise.#[injectable]emits the same probes; this macro offers them to a hand-writtenConstructimpl that wants all five checked.
Structs§
- Alias
alias::<T, Q>(): the new keyT @ Q, waiting for the existing one inAlias::of.- Bound
Addr - One address a server listens on, as
Server::boundreports it. - Cancelled
- Resolves when the execution is cancelled: at a client disconnect or the deadline for a call, at the deadline for a standalone execution, and at the end of the drain for either.
- Closed
executeandExecution::openfrom Draining on;loadcarries it inLoadError::Closedfrom Stopping on (§9.5). Constructed by the core alone.- Configure
Error - One server’s configuration failure: route-table construction, a duplicate route, TLS loading,
CORS validation, endpoint parsing, an inherited socket that does not exist, or a backend limit.
Displaywrites the entry as its report does. - Configure
Errors - Every failure the servers’
preparecalls reported, one entry per failure, collected across every server before any of them binds (transports DESIGN §2.7, X6).StartupError::Configurecarries it, asStartupError::WiringcarriesWiringErrors. - Contribute
- Contributions to the collection
U @ Q, read asMany<U, Q>or, by a transport, throughResolver::entries(§3.2, §7). - Controller
Handle - What
ModuleDef::controllerreturns: the controller it registered, whose routes and gateway paths take a runtime prefix. - Dep
- The single binding
T @ Q, as the sharedArcevery holder of the binding holds. - Dependencies
- The declared injection points of a binding, a hook closure, a readiness closure or an
enhancer closure: what
Construct::dependenciesand the factory traits fill in, and what the wiring pass resolves. The wiring pass learns what a binding reads from this list alone. - Differing
Setting - One setting two registrations of a module disagree on: its name and each side’s value as
ModuleSettingswrote it,Nonewhere that side has no such setting. - Drain
Token - The proof that a transport opens a terminal execution. Private field, one source: the core
hands it to each transport through
Server::drainas Draining begins.Clone, anArcinside, because a transport opens terminal executions from connection tasks spawned long before the drain; cloning creates no second source. - Draining
- Resolves as the drain begins (§9.5), a moment before the servers stop accepting, send GOAWAY
and close idle keep-alives: the core fires it, then hands each server its drain. No execution
opens from then on, so a request arriving in that moment is refused, not served. The same future on an execution and on an
AppHandle, resolving at the same moment; it does not resolve during the before-shutdown stage. - Dynamic
Module - A module built at runtime by a function, for integration crates. Its identity is the owner type plus the configuration value, so these are still distinct Rust-typed identities.
- EndStream
- The sentinel an error handler returns on the late path to end a stream cleanly, as if it had
returned
None(transports DESIGN §2.3, X7). Anywhere else it is an ordinary error. - Enhancer
Spec - The enhancers one tier declares for one handler: the controller’s, or the method’s. Each is declared by type (resolved from the container with the controller module’s visibility), by value (built once and shared), or by closure, whose parameters are injection points.
- Entries
- The contributions to one collection, unresolved, in collection order.
- Entry
- One contribution to a collection, built on
Entry::resolve: the shared singleton, the value, or a per-execution build cached in the current execution. - Exec
Options - Options for a new execution. Each setter keeps the others, so they compose in any order.
- Execution
- One execution, as its holder owns it. Not
Clone: anything else takes ahandle. Dropping it ends the execution (§3.8): the execution-scoped instances drop, the drain stops waiting for it, and every handle’sgetanswersLookupError::ExecutionEnded. - Execution
Ref - A cheap-clone handle to an execution: the same methods as
Executionexceptseedandroute_to, so an input a guard or a subtask seeded could never be one the wiring pass did not see, and only the holder decides the module. - Expiry
- A bound’s end on a
Timer’s clock, ready with theCutthat ended it. The wait is asked of the clock when theExpiryis made, for what is left of the bound then, and a bound already passed by then isExpiredwithout a sleep. - Ext
- A typed view of per-execution data: the extension
Ta guard or middleware wrote earlier in this execution throughExtensions::insert. - Extensions
- The typed per-execution bag a guard or middleware writes and a handler or an
execution-scoped service reads as
Ext<T>. Written through a shared reference, so every clone of a transport’sCxwrites the same bag. - Guard
Rejected - A guard’s
Ok(false), as the error handlers see it (§7). Unclaimed, the transport renders its forbidden status. - Handle
- What
provide,value, the factory methods and thecontributebuilder return: a handle on the binding registered by that call, through which its second keys, qualifier, construction bound, readiness check and closure hooks are written. - Handler
Info - A mounted handler as an enhancer and a report read it: its transport key, controller, name, route, shape and declared metadata (transports DESIGN §2.5, X3).
- Handler
Spec - One handler, as a transport’s attribute declares it to
Mount::handler(transports DESIGN §2.5, X3). Named asEnhancerSpecis. - Hooks
- The hooks a
Constructtype registers. Each method compiles only whenTimplements the matching trait; a hand-writtenConstructimpl calls the ones it implemented, andhooks!probes all five. - Input
input::<T>(): an execution input, waiting for the transport that seeds it inInput::seeded_by(§6.4).- Input
Reader - One handler’s read of an execution input, as
Mounted::handlers_readingreports it: the handler and its transport, which a refusal writes as the path’s first step against its report’s names, as inUsersController::get (Http), then the steps after it. - Inputs
- The execution inputs one transport seeds, written by
Transport::inputs(transports DESIGN §2.10, X4). - Key
- The pair of a type and a qualifier that a binding is stored under:
Key::of::<PgPool, Replica>(). - KeyName
- A key as the errors name it:
PgPool,PgPool @ Replica,dyn Plugin (collection). - Keyed
Mas the keyed instanceQ: itself a module, built byModule::keyed.- Many
- Every contribution to
T @ Q, in collection order, from every module in the application. - Metadata
- The metadata declared on one handler with
#[meta(..)], on the method and on its controller impl (transports DESIGN §2.5). - Module
Def - What
Module::registerwrites into: imports, bindings, contributions, controllers, exports, inputs, module hooks, secrets and typed metadata. Registration is synchronous and free of I/O; nothing is built untilconnect. - Module
Hook - The handle a module hook returns: its bound is written once, with
.timeout(..)or.unbounded(), or left atDefault. A wiring error about the bound names the call that wrote it, and a zero.timeout(..)is refused atwire(). - Module
Identity - Who a module is: its type, plus its configuration value if it has one, plus a qualifier if
it is keyed. Two configurations of one type are two modules; the same configuration imported
twice is one, its
settingsequal in both imports. - Module
Name - A module as the errors name it: the type name or its label, the qualifier, and a position for
a second configuration of one type, as in
DbModule @ ReplicaorDbModule #2. - Module
Ref - A handle to one module, for runtime lookups limited to what that module sees (§8.5).
- Module
Settings - The settings a module answers from
Module::settings: each a name and its value asDebugwrites it, in the order written. Two imports compare by that text, so a value whoseDebugtext differs between equal values, aHashMapiterating in another order or a pointer, makes two equal registrations differ. - Mount
- Where a controller declares its handlers. Called during
wire(), so the wiring pass knows every handler’s transport, enhancers and parameter reads before anything is built. - Mounted
- What a server receives when it prepares and binds: its transport’s handlers and the app.
- Mounted
Handler - A handler as a transport receives it when it prepares and binds: its name, its controller and
module, its enhancer tiers, its
HandlerInfoand the transport’s own handler value. - Next
- The rest of the interceptor chain and the handler, handed to
Interceptor::intercept. - Panic
Recovered - A panic in the pipeline, caught by
dispatchand offered to the error handlers as the call’s error (§7). Unclaimed, the transport renders its internal-error status. - Permanent
- Marks a failure that retrying this start, with this configuration on this runtime, cannot mend:
bad credentials, an unknown database, a runtime the integration does not support, a migration
that failed, a runtime that has shut down (
RuntimeShutDown). A process restart brings a new runtime, which is a different start. A readiness attempt whose error is one ends the check at once, with no further attempt and no backoff, asConnectError::Readiness { reason: Errored(..) };is_permanentfinds one in aStartupError, somaincan tell a start that retrying cannot mend from one it might. - Prepare
Entry - One failure a
PrepareErrorlists, as data a test or a tool reads without parsing the report’s text: the types it names, the source line that declared what failed, what failed, and the route scopes involved, and, for what was refused as something that would never run, why. - Prepare
Error - A
prepareerror whose text names types: what a server answers, boxed, so the startup report decides how each name prints. The report runsTypeName::collidingover the names of every server’sPrepareErrorand every failing transport, and callstextwith the result, so a type that prints alike with a different type another server names, or with a transport, is written with its full path. - Prepare
Panicked - A server’s
preparethat panicked, caught bylisten()and reported as that server’sConfigureError, whosesourceholds it. The other servers’preparestill run, and nothing binds.is_panicrecognises it. - Redacted
- An error from outside the core, after the redaction function. Formatting writes the redacted
text and never the original;
source()isNone, so a reporter walking the chain stops at the text too. The original is reached throughdowncast_refandinto_inneralone, which is what lets an error handler map a constructor’s domain error to a status. - Refused
- What a runtime that has shut down answers
Timer::try_sleepandSpawn::try_spawnwith. - Requirement
- What one injection point reads, written by
FromContainer::describeand checked by the wiring pass against the visibility of the module the injection point belongs to. - Resolver
- The view an injection point reads through: the graph, the module whose visibility applies, and the current execution when there is one.
- Runtime
Missing listen()’s refusal of an app that binds a transport with noRuntime(§9.5), stored inStartupError::Bind’ssourcelike a transport’s error;source.downcast_ref::<RuntimeMissing>()tells it from a port already taken.- Runtime
Shut Down - Work that ended because the runtime refused a wait, having shut down: a loop whose pacing wait
was refused, or a bounded wait whose bound was. Reported where a reader learns why the work
ended, in place of an elapsed bound or a loop out of attempts, neither of which happened. The
core reports a hook, a construction, a readiness check, the shutdown cap or a transport’s
closebound the runtime refused asFailureReason::Erroredholding one. Retrying this start on a runtime that has shut down cannot succeed, so whoever raises one in a startup error raises it insidePermanent. - Secret
- A value the redaction function replaces wherever it appears in an error this graph reports,
once registered: by
m.secret(&self.url), by#[module]for everySecret<_>field of a configured module, or by binding it withm.value(..). - Shutdown
- The outcome of a shutdown, received by
serveand by everyclosecaller (§9.5). - Shutdown
Error - One outcome, several receivers; the failures sit behind the
Arc. - Signal
- The name of what started a shutdown: an OS signal (
"SIGTERM") or a reason a job givesclose("done"). - Task
Handle - A spawned task:
abortto stop it,.awaitfor how it ended, drop to let it run on. - Trace
Context - A trace context: a trace ID, a span ID, the flags as bits and the trace state.
- Trace
State - A
tracestatelist:key=valuemembers, at most 32, each key once, in order (§3.3).Displaywrites the header value, members joined by,. - Type
Name - A type as an error report names it:
TypeName::of::<my_app::User>()printsUser, and with{:#}printsmy_app::User. - Undeclared
Read - A hand-written
Constructread a key itsdependenciesdoes not declare. - Value
Handle - A spawned task that answers a value, as
spawn_withstarts it:Okwith the value, orErrwithTaskEnd::AbortedorTaskEnd::Panicked. Polling after the value was taken answersErr(TaskEnd::Finished). - Wiring
Errors - Every failure
wire()found, one entry each, in the order the six steps of §10.1 found them.Displaywrites the full report:
Enums§
- Binding
Kind - Whether a key holds one binding or a collection of contributions.
- Bound
- How long a hook, a construction or a readiness check may take.
- Bound
Item - The item a bound is written on, as
WiringError::ZeroBoundnames it. - Cancel
Reason - Why an execution was cancelled (transports DESIGN §2.6, X5). Written once, beside the
cancellation signal: the first
cancel_withdecides it, and a cancelled execution always has one. - Connect
Error - A failure in the connect phase, on
StartupError::Connectfromconnectand onLoadError::Connectfromload. - Construct
Error - Why a constructor did not return its instance.
- Cut
- What ended a
timeoutor anExpirybefore its work: the bound passing on the clock, or the clock’s runtime refusing to time it, having shut down. - Dispatch
Stage - Which stage of
dispatchpanicked. - Failure
Reason - Why a hook, a construction, a readiness check or a transport’s
closedid not complete. One enum for every place one can fail, so a timeout reads the same on an init hook, a destroy hook, a constructor, a check and aclose. - Hook
Kind - Which hook a
ConnectError::HookorShutdownFailure::Hooknames. - Input
Origin - One source of an execution input’s key, as
WiringError::InputConflictnames it.atis the call that declared or bound it. - Late
Outcome - What
dispatch_latetells the transport to do with an error raised after its reply began streaming (transports DESIGN §2.3, X7). AnErritem cannot change a status, so every outcome is rendered in the transport’s mid-stream form. - Limit
- Which limit a
TimedOuthit. - Load
Error - Why
loaddid not return aModuleRef(§8.6). - Load
Refusal - What a lazily loaded module may not bring, because the graph has been handed out (§8.6).
- Lookup
Error - Lookup
Kind - What a
LookupError::NotFounddid not find. - Meta
Tier - Which tier declared a metadata value.
- Module
Site - Where a module was registered, as
WiringError::DifferingSettingsnames each side. - Serve
End - How a transport’s
serveended while the app was still running, onShutdownFailure::Serve. - Shape
- The call shape a handler’s signature declares: a streamed request comes from an inbound-stream parameter, a streamed reply from a stream return (transports DESIGN §5.1, §6.1).
- Shutdown
Failure - Startup
Error - Stream
Outcome - How a reply stream ended, as
Execution::on_stream_endcallbacks receive it. - TaskEnd
- How a spawned task ended, as its handle answers it. Cloning shares a panic’s message.
- Trace
Mode - Whether the app reads and writes W3C trace headers, set with
AppBuilder::trace. - Trace
Origin - Where an execution’s context came from, which decides how a client writes it out (§6.3).
- Unreached
- Why
preparerefused something it was given as something that would never run, asPrepareEntry::reasonreads it.Displaywrites the clause the refusal’s text ends with, so the text follows from the reason. - Wiring
Error - One wiring failure.
atis the source location of the registration call that declared the offending item, captured with#[track_caller].
Constants§
- RUNTIME_
SHUT_ DOWN - The reason a failure the runtime’s refusal caused is reported under: by
RuntimeShutDown, and by a transport that answers it as a wire reason, as an RPC call’sErrorInfodoes.
Traits§
- Before
Application Shutdown - Construct
- A type the container builds, with its dependencies read from its injection points.
- Controller
- The mark of a dispatch target: a
Constructtype a transport reaches through the handlers itsHandlersimpl declares, one per transport route, message pattern, gRPC method or WebSocket event. The trait has no methods; what a controller mounts isHandlers::mount, andHandlers: Controller. - Erased
Error Handler - The dyn-compatible twin of
ErrorHandler; its trait object is the role keyAnyErrorHandler. - Erased
Guard - The dyn-compatible twin of
Guard, implemented for every guard; its trait object is the role keyAnyGuard. - Erased
Interceptor - The dyn-compatible twin of
Interceptor; its trait object is the role keyAnyInterceptor. - Error
Handler - Errors reach the error handlers method level first, then controller, then global.
Okclaims the error with a reply;Errhands the next handler the error it returns, the same one or a reshaped one. A guard’s refusal arrives asGuardRejected, and a panic in a guard, an interceptor, the handler or an earlier error handler asPanicRecovered. - Factory
- A closure whose parameters are injection points and which returns a future:
|cfg: Dep<DbConfig>| async move { .. }. Implemented for closures of zero to twelve parameters. - From
Container - How every injection point is read. Its type decides what it reads: the container reads
T @ QforDep<T, Q>, whichever identifier or alias the user wrote. - Guard
- Decides whether a call proceeds.
Ok(true)admits it.Ok(false)refuses a caller the guard knows and will not admit, asGuardRejected: 403 on HTTP,PERMISSION_DENIEDon gRPC.Err(CallError::unauthorized(..))refuses a caller that has not authenticated: 401 with its challenge on HTTP,UNAUTHENTICATEDon gRPC. Any otherErrgoes to the error handlers as it stands. Seeulo_transport::CallError::unauthorizedfor an example. - Handlers
- The handlers of a controller, which
ModuleDef::controllerand#[module]’scontrollersmount: a type registered there implements it, and through itController.#[handlers]writes the impl, whosemountdeclares each handler of the impl block. A controller that mounts its handlers by hand, a WebSocket gateway implementingGatewayamong them, implements it itself,<Self as Gateway>::mount(m)for a gateway. - Interceptor
- Meta
- Typed per-module metadata that a transport reads, written through
ModuleDef::meta.ulo-httpstores its route middleware this way. - Module
- A module: an identity and a synchronous, I/O-free registration.
- OnApplication
Bootstrap - OnApplication
Shutdown - OnModule
Destroy - OnModule
Init - Role
- The role keys:
AnyGuard<T>,AnyInterceptor<T>andAnyErrorHandler<T>for everyT: Transport, and nothing else. - Runtime
- The app’s clock and executor in one value, set with
AppBuilder::runtime. Services read it asDep<dyn Runtime>, andDep<dyn Timer>resolves to the same object; after a laterAppBuilder::timer,Dep<dyn Runtime>spawns on the runtime and times with that timer. Either way the object is the app’s wrapper around the runtime given, which redacts a spawned task’s panic with the app’s secrets. Implemented for anything that implements both halves. - Runtime
Task - A runtime’s own handle to one task, boxed inside a
TaskHandle. A runtime adapter implements it; code that spawns never sees it. - Server
- Implemented by a transport’s server: handed to
app.bind(..), prepared and bound bylisten(), driven byserve, drained and closed by the shutdown sequence (§9.4, §9.5). - Shutdown
Factory - A closure
before_shutdownoron_shutdowntakes on a binding handle or aModuleDef: the shutdown’sSignalfirst, then any number of injection points, returning a future of(). - Spawn
- Starts tasks on a runtime’s executor. With
Timerit makes aRuntime. - Timer
- The app’s one clock. Every wait the core times, the drain, a hook, a construction, a readiness check, runs through it; it is set on the builder and supplied by a runtime adapter.
- Trace
Source - The parent of an execution’s spans, as a tracer sees it: the hook a transport’s span calls between creating the span and first entering it (integrations §6.4, I7).
- Transport
- Implemented by marker types in transport crates:
ulo_http::Http,ulo_rpc::Rpc, … - Transport
Metadata - A metadata type that means something on one transport alone, naming it (transports DESIGN
§2.5, X24):
ulo_http::Timeoutandulo_http::MaxBodynameHttp.
Functions§
- dispatch
- Runs
handler’s enhancer stack aroundcallfor one call.execis the call’s execution, the onecxwraps;callreceives a clone ofcxand answers the handler’s reply. - dispatch_
late - Runs
handler’s error handlers overerr, an error that arrived after the reply started: anErritem of a reply stream, the first included, sincedispatchreturns a streaming reply without pulling it (transports DESIGN §2.3, X7). - is_
panic - Whether
errorholds a panic the core caught, whichever shape it arrived in. Inside a call there are two:PanicRecoveredfrom a guard, an interceptor, the handler or an error handler, andLookupError::Constructwithreason: Panickedfrom a build the container ran for the call, an enhancer, the controller or one of their dependencies. An error handler that answers every panic alike tests this instead of matching both. - is_
permanent - Whether retrying this start, with this configuration on this runtime, cannot succeed: the
failure carries a
Permanent, or it is a misconfiguration by its phase. A process restart brings a new runtime, which is a different start. - recover
- Offers
errto the error handlers where nodispatchran around it: an error or a panic in a transport’s pre-dispatch stage (transports DESIGN §3.3). WithSome(handler), a route matched:handler’s method tier, then its controller tier, then the global tier. WithNone, nothing matched, and only the global error handlers ofTapply. - spawn_
with - Spawns
futonruntimeand answers a handle that resolves to its value. The value is left in a slot the handle reads once the task has ended, so no channel is involved;abortand drop mean what they mean onTaskHandle. Polling after the value was taken answersErr(TaskEnd::Finished). - timeout
futraced against anExpiryofd:Errwith theCutwhen the bound ends first, droppingfutat its current await.futis polled first, so work that completes in the poll the bound passes in counts as done, and the ties with a refusal are theExpiry’s.- timeout_
at timeoutfor a bound ending atuntilontimer’s clock.
Type Aliases§
- AnyError
Handler - AnyGuard
- The role key for global guards:
m.enhancer::<AnyGuard<Http>>().provide::<AuthGuard>(|a| a). - AnyInterceptor
- BoxError
- BoxFuture
Attribute Macros§
- construct
- Marks the constructor inside an
#[injectable]or#[controller]impl when it is not namednew; the attribute on the impl reads and removes it. Anywhere else it is an error. - controller
- A controller: a type the container builds and its transports reach, through the handlers of
its
#[handlers]impl. Only another controller injects one;wire()refuses a read of a controller by any other binding. - error_
handlers - Error handlers, with the same forms as
#[guards]. - guards
- Guards for every handler of a
#[handlers]impl, or for one method: by type (AuthGuard), transport-scoped by type (http = AuthGuard), by value (value = expr), or by closure (with = |u: Ext<CurrentUser>| ..). Read and removed by#[handlers], so on the impl it goes below#[handlers]; on a method it may sit insidecfg_attr; anywhere else it is an error. - handlers
- A controller’s handler impl, on every transport: writes
impl ulo::Handlers, whosemountregisters each handler, with the impl’s#[guards],#[interceptors],#[error_handlers]and#[meta]as the controller tier and each method’s as the method tier; every other item stays as written. A handler is a method carrying its transport’s attribute,#[ulo_http::get(..)],#[ulo_rpc::message(..)],#[ulo_ws::message(..)]or#[ulo_grpc::method]. The controller itself is declared with#[controller], on the struct or stacked on this impl in either order, wherenewor the#[construct]fn builds it, and a module that registers the controller mounts these handlers throughHandlers::mount.HandlersrequiresController, so on a type that is not a controller, one declared#[injectable]among them,#[handlers]is a compile error namingController. - injectable
- A type the container builds and injects into others: a provider, listed under a module’s
providers. - interceptors
- Interceptors, with the same forms as
#[guards]. - meta
- Declared metadata on a handler or on its
#[handlers]impl: plainSend + Sync + 'staticvalues, built once when the handler mounts, which guards and interceptors read throughcx.exec().handler(). The method’s declaration of a type wins over the impl’s. Read and removed by#[handlers], so on the impl it goes below#[handlers]; on a method it may sit insidecfg_attr; anywhere else it is an error. - module
- A module:
imports,providers,controllers,exportsandglobal, lowered to aModuleimpl whoseregistercalls the value API. A struct with fields is a configured module, identified by value, and everySecret<_>field is registered for redaction.