pub(crate) struct FileSpec {
pub(crate) executable: bool,
pub(crate) formatter: Option<FormatterSpec>,
pub(crate) document: DocumentSpec,
}Expand description
File metadata shared by every managed document kind.
Fields§
§executable: boolWhether the file is executable.
formatter: Option<FormatterSpec>Per-file formatter override. Null inherits the component default.
document: DocumentSpecThe file’s desired content.
Implementations§
Source§impl FileSpec
impl FileSpec
pub(crate) fn validate(&self, path: &RepositoryPath) -> Result<(), FilesError>
pub(crate) const fn is_partial(&self) -> bool
pub(crate) const fn mode(&self) -> FileMode
pub(crate) fn formatter<'a>( &'a self, default: Option<&'a FormatterSpec>, ) -> Option<&'a FormatterSpec>
pub(crate) fn reconciled_content( &self, path: &RepositoryPath, current: Option<&[u8]>, ) -> Result<Vec<u8>, FilesError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileSpec
impl RefUnwindSafe for FileSpec
impl Send for FileSpec
impl Sync for FileSpec
impl Unpin for FileSpec
impl UnsafeUnpin for FileSpec
impl UnwindSafe for FileSpec
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