pub struct PvPolicy {
pub pv: String,
pub name: Option<String>,
pub sample_mode: PolicySampleMode,
pub dbr_type: Option<ArchDbType>,
pub sampling_period: Option<f64>,
}Expand description
Per-PV archiving policy.
Fields§
§pv: StringThe PV name pattern (supports glob).
name: Option<String>Stable identifier persisted onto the matched PV’s typeinfo so audit / metrics paths know which policy governed the archive (Java parity b30f1a6). Defaults to the pattern when omitted.
sample_mode: PolicySampleModeSampling mode.
dbr_type: Option<ArchDbType>Expected DBR type (auto-detected if None).
sampling_period: Option<f64>Sampling period in seconds (only for Scan mode).
Implementations§
Source§impl PvPolicy
impl PvPolicy
Sourcepub fn policy_name(&self) -> &str
pub fn policy_name(&self) -> &str
Return the policy’s stable name, falling back to the pattern.
Source§impl PvPolicy
impl PvPolicy
pub fn to_sample_mode(&self) -> SampleMode
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PvPolicy
impl<'de> Deserialize<'de> for PvPolicy
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 PvPolicy
impl RefUnwindSafe for PvPolicy
impl Send for PvPolicy
impl Sync for PvPolicy
impl Unpin for PvPolicy
impl UnsafeUnpin for PvPolicy
impl UnwindSafe for PvPolicy
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