pub struct VoiceConsent {
pub voice_asset_hash: u64,
pub allow_synthesis: bool,
pub allow_clone_training: bool,
pub revoked_before_epoch: u32,
}Fields§
§voice_asset_hash: u64§allow_synthesis: bool§allow_clone_training: bool§revoked_before_epoch: u32Lamport-ish revoke epoch; synthesis denied if now_epoch < revoked_before.
Implementations§
Source§impl VoiceConsent
impl VoiceConsent
Sourcepub fn synthesis_only(voice_id: &str) -> Self
pub fn synthesis_only(voice_id: &str) -> Self
Synthesis-only consent.
Sourcepub fn revoke(&mut self, epoch: u32)
pub fn revoke(&mut self, epoch: u32)
Explicit revoke: future calls with now_epoch >= revoked_before still need
allow_synthesis; revoke sets allow_synthesis=false and stamps epoch.
Sourcepub fn is_allowed_at(&self, now_epoch: u32) -> bool
pub fn is_allowed_at(&self, now_epoch: u32) -> bool
true when allowed-at.
Trait Implementations§
Source§impl Clone for VoiceConsent
impl Clone for VoiceConsent
impl Copy for VoiceConsent
Auto Trait Implementations§
impl Freeze for VoiceConsent
impl RefUnwindSafe for VoiceConsent
impl Send for VoiceConsent
impl Sync for VoiceConsent
impl Unpin for VoiceConsent
impl UnsafeUnpin for VoiceConsent
impl UnwindSafe for VoiceConsent
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