pub enum Item {
Locked(LockedItem),
Unlocked(UnlockedItem),
}Variants§
Locked(LockedItem)
Unlocked(UnlockedItem)
Implementations§
Source§impl Item
impl Item
pub const fn is_locked(&self) -> bool
pub fn as_unlocked(&self) -> &UnlockedItem
pub fn as_mut_unlocked(&mut self) -> &mut UnlockedItem
pub fn as_locked(&self) -> &LockedItem
Sourcepub fn matches_attributes(
&self,
attributes: &impl AsAttributes,
key: Option<&Key>,
) -> bool
pub fn matches_attributes( &self, attributes: &impl AsAttributes, key: Option<&Key>, ) -> bool
Check if this item matches the given attributes
Trait Implementations§
Source§impl From<LockedItem> for Item
impl From<LockedItem> for Item
Source§fn from(item: LockedItem) -> Self
fn from(item: LockedItem) -> Self
Converts to this type from the input type.
Source§impl From<UnlockedItem> for Item
impl From<UnlockedItem> for Item
Source§fn from(item: UnlockedItem) -> Self
fn from(item: UnlockedItem) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnsafeUnpin for Item
impl UnwindSafe for Item
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