Struct cargo_self::engine::element::Element
source · pub struct Element {
pub path: PathBuf,
pub parent: PathBuf,
pub modified: u64,
pub is_file: bool,
pub depth: usize,
pub content: Option<String>,
pub self_path: Option<PathBuf>,
pub self_content: Option<String>,
pub self_hash: Option<String>,
}Fields§
§path: PathBuf§parent: PathBuf§modified: u64§is_file: bool§depth: usize§content: Option<String>§self_path: Option<PathBuf>§self_content: Option<String>§self_hash: Option<String>Implementations§
source§impl Element
impl Element
pub fn write_new_self_content(&self, new_self_content: String) -> bool
pub fn relative_path(&self) -> PathBuf
pub fn find_children(&self, elements: &[Element]) -> Vec<Element>
pub fn find_parent(&self, elements: &[Element]) -> Option<Element>
pub fn self_content(&self) -> String
Trait Implementations§
source§impl<'de> Deserialize<'de> for Element
impl<'de> Deserialize<'de> for Element
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 RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnwindSafe for Element
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