//! Ambient (context-free) field-level masking.
//!
//! The transport bindings ([`crate::graphql::masked_output_for`],
//! [`crate::http::mask_entity_response`]) read the [`Ability`](crate::Ability)
//! from a transport handle. Some paths have none: a `#[dataloader]` batch runs
//! on a task async-graphql spawned off-request, and an MCP tool emits arbitrary
//! JSON-RPC content. Those read the ability from the ambient task-local instead
//! ([`current_ability`]), which [`crate::with_ability`] installs around the
//! batch / handler.
use EntityTrait;
use Serialize;
use DeserializeOwned;
use crate::;
/// Mask `model` into the wire DTO `O` for action `A` using the ambient
/// [`Ability`](crate::Ability). Fails **closed**: with no ambient ability the
/// masked value is an empty object, so only unrestricted fields survive — a
/// wire type with required restricted fields errors rather than leaking a
/// fully-populated row.