pub struct Policy {
pub enabled: bool,
pub timezone: String,
pub blocked_artists: Vec<String>,
pub radio_allowed: bool,
pub podcasts_allowed: bool,
pub blocked_podcasts: Vec<String>,
pub days: [DayPolicy; 7],
pub week_limit_seconds: Option<u32>,
}Expand description
Administrator-owned restrictions for one stable account owner.
Fields§
§enabled: boolDisabled policies retain their settings but do not constrain listening.
timezone: StringIANA time-zone name used for civil dates, weeks and clock windows.
blocked_artists: Vec<String>Canonical, unfederated artist references, retained across catalogue scans.
radio_allowed: boolWhether independent radio listening is permitted.
podcasts_allowed: boolWhether podcasts are available; older policies retain their allowed default.
blocked_podcasts: Vec<String>Canonical RSS addresses whose episodes are refused.
days: [DayPolicy; 7]Monday first, Sunday last.
week_limit_seconds: Option<u32>Optional maximum seconds in the local Monday-to-Monday week.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Policy
impl<'de> Deserialize<'de> for Policy
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 Policy
impl StructuralPartialEq for Policy
Auto Trait Implementations§
impl Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnwindSafe for Policy
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