pub struct RawPolicy {
pub schema_version: Option<String>,
pub project: RawProject,
pub commands: Option<RawCommands>,
pub paths: Option<RawPaths>,
pub roles: Option<IndexMap<String, RawRole>>,
pub constraints: Option<RawConstraints>,
pub outputs: Option<Vec<String>>,
}Expand description
Raw deserialized policy as it appears in agent-policy.yaml.
Serialize is required so serde_json::to_value(&raw) compiles in the load pipeline.
All Option fields use skip_serializing_if so None values are omitted from the
JSON rather than serialized as null — the JSON Schema uses plain type checks (not
["T", "null"]), so a null value would fail validation.
Fields§
§schema_version: Option<String>Declares the schema version. Use "1" for all new files.
project: RawProject§commands: Option<RawCommands>§paths: Option<RawPaths>§roles: Option<IndexMap<String, RawRole>>§constraints: Option<RawConstraints>§outputs: Option<Vec<String>>List of output target IDs.
Valid values: "agents-md", "claude-md", "cursor-rules", "gemini-md", "copilot-instructions".
Defaults to ["agents-md"] when omitted.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RawPolicy
impl<'de> Deserialize<'de> for RawPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RawPolicy
impl RefUnwindSafe for RawPolicy
impl Send for RawPolicy
impl Sync for RawPolicy
impl Unpin for RawPolicy
impl UnsafeUnpin for RawPolicy
impl UnwindSafe for RawPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more