pub struct PolicyRef {
pub kind: PolicyKind,
pub id: PolicyId,
pub version: Option<String>,
}Expand description
Defines the policy ref SDK value. Construction records local state only; documented runtimes, executors, or ports own side effects.
Fields§
§kind: PolicyKindKind/category for this record, capability, event, or detected resource.
id: PolicyIdStable identifier for this record.
version: Option<String>Version string for this capability, package, or protocol surface. Use it for compatibility checks during package or adapter resolution.
Implementations§
Source§impl PolicyRef
impl PolicyRef
Sourcepub fn new(id: impl Into<String>) -> Self
pub fn new(id: impl Into<String>) -> Self
Creates a new domain::refs value with explicit caller-provided inputs. This constructor is data-only and performs no I/O or external side effects.
Sourcepub fn with_kind(kind: PolicyKind, id: impl Into<String>) -> Self
pub fn with_kind(kind: PolicyKind, id: impl Into<String>) -> Self
Returns this value with its kind setting replaced. The method follows builder-style data construction and does not execute external work.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PolicyRef
impl<'de> Deserialize<'de> for PolicyRef
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
impl Eq for PolicyRef
impl StructuralPartialEq for PolicyRef
Auto Trait Implementations§
impl Freeze for PolicyRef
impl RefUnwindSafe for PolicyRef
impl Send for PolicyRef
impl Sync for PolicyRef
impl Unpin for PolicyRef
impl UnsafeUnpin for PolicyRef
impl UnwindSafe for PolicyRef
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