pub struct Me<'a> {
pub addresses: &'a [String],
pub alternates: &'a [Matcher],
}Expand description
Which addresses count as mine: the exact ones the identity layers
name (bare, lowercase) plus mutt’s alternates, regexes over the
bare address. Everything that asks “is this me?” goes through here:
~p and ~P, the +/T/C/F index marks, reverse_name, the
group-reply dedup, and Mail-Followup-To.
Fields§
§addresses: &'a [String]My bare lowercase addresses.
alternates: &'a [Matcher]mutt’s alternates: regexes for my other addresses.
Implementations§
Source§impl<'a> Me<'a>
impl<'a> Me<'a>
pub fn new(addresses: &'a [String], alternates: &'a [Matcher]) -> Me<'a>
Sourcepub fn addresses(addresses: &'a [String]) -> Me<'a>
pub fn addresses(addresses: &'a [String]) -> Me<'a>
Only the exact addresses, no alternates (tests, and callers that have no config in reach).
pub fn is_me(&self, addr: &str) -> bool
Sourcepub fn any<'b>(&self, addresses: impl IntoIterator<Item = &'b String>) -> bool
pub fn any<'b>(&self, addresses: impl IntoIterator<Item = &'b String>) -> bool
True when any of these bare addresses is mine.
Sourcepub fn wrote(&self, from_header: &str) -> bool
pub fn wrote(&self, from_header: &str) -> bool
True when the message’s From names one of my addresses (~P).
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Me<'a>
impl<'a> RefUnwindSafe for Me<'a>
impl<'a> Send for Me<'a>
impl<'a> Sync for Me<'a>
impl<'a> Unpin for Me<'a>
impl<'a> UnsafeUnpin for Me<'a>
impl<'a> UnwindSafe for Me<'a>
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