pub struct ItemPair {
pub left: Option<ItemRef>,
pub right: Option<ItemRef>,
}Expand description
A pair of items to compare. Either side may be None (add/remove).
Fields§
§left: Option<ItemRef>§right: Option<ItemRef>Implementations§
Source§impl ItemPair
impl ItemPair
pub fn both(left: ItemRef, right: ItemRef) -> Self
pub fn added(right: ItemRef) -> Self
pub fn removed(left: ItemRef) -> Self
pub fn logical_path(&self) -> &str
pub fn extension(&self) -> Option<String>
pub fn media_type(&self) -> Option<&str>
pub fn is_dir(&self) -> bool
pub fn matching_content_hash(&self) -> Option<&str>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ItemPair
impl<'de> Deserialize<'de> for ItemPair
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
Auto Trait Implementations§
impl Freeze for ItemPair
impl RefUnwindSafe for ItemPair
impl Send for ItemPair
impl Sync for ItemPair
impl Unpin for ItemPair
impl UnsafeUnpin for ItemPair
impl UnwindSafe for ItemPair
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