pub struct BinMask { /* private fields */ }Expand description
Occupancy mask for 2-D FFT bins, built from a CoverProfile.
A true entry at (row, col) means that bin is occupied by a known
external signal (e.g. an AI generator’s watermark carrier) and must
not be used for payload embedding.
Implementations§
Source§impl BinMask
impl BinMask
Sourcepub fn build(profile: &CoverProfile, width: u32, height: u32) -> Self
pub fn build(profile: &CoverProfile, width: u32, height: u32) -> Self
Build a bin-occupancy mask from profile at the given resolution.
CoverProfile::Camera→ all-zeros (no protected bins).CoverProfile::AiGenerator→ marks strong carrier bins (coherence >= 0.90).
Sourcepub fn is_occupied(&self, row: u32, col: u32) -> bool
pub fn is_occupied(&self, row: u32, col: u32) -> bool
Return true if the bin at (row, col) is marked as occupied.
Sourcepub fn occupied_count(&self) -> usize
pub fn occupied_count(&self) -> usize
Return the number of occupied bins.
Sourcepub const fn total_bins(&self) -> usize
pub const fn total_bins(&self) -> usize
Total number of bins in the mask.
Auto Trait Implementations§
impl Freeze for BinMask
impl RefUnwindSafe for BinMask
impl Send for BinMask
impl Sync for BinMask
impl Unpin for BinMask
impl UnsafeUnpin for BinMask
impl UnwindSafe for BinMask
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more