.. _jgdv.structs.chainguard.proxies.failure: ======================================= jgdv.structs.chainguard.proxies.failure ======================================= .. py:module:: jgdv.structs.chainguard.proxies.failure .. autoapi-nested-parse:: A Proxy for ChainGuard, which allows you to use the default attribute access (data.a.b.c) even when there might not be an `a.b.c` path in the data. Thus: data.on_fail(default_value).a.b.c() Note: To distinguish between not giving a default value, and giving a default value of `None`, wrap the default value in a tuple: (None,) Type Aliases ------------ .. autoapisummary:: jgdv.structs.chainguard.proxies.failure.Wrapper Classes ------- .. autoapisummary:: jgdv.structs.chainguard.proxies.failure.GuardFailureProxy Module Contents =============== .. py:data:: Wrapper :type: TypeAlias :value: Callable[[TomlTypes], Any] .. _jgdv.structs.chainguard.proxies.failure.GuardFailureProxy: .. py:class:: GuardFailureProxy(data, types = None, index = None, fallback = NO_FALLBACK) Bases: :py:obj:`jgdv.structs.chainguard.proxies.base.GuardProxy` A Wrapper for guarded access to toml values. you get the value by calling it. Until then, it tracks attribute access, and reports that to GuardBase when called. It also can type check its value and the value retrieved from the toml data