pub struct FileMetadata { /* private fields */ }
Implementations§
source§impl FileMetadata
impl FileMetadata
pub fn new() -> Ref<Self>
pub fn with_filename<S: BnStrCompatible>(name: S) -> Ref<Self>
pub fn close(&self)
pub fn session_id(&self) -> usize
pub fn filename(&self) -> BnString
pub fn set_filename<S: BnStrCompatible>(&self, name: S)
pub fn modified(&self) -> bool
pub fn mark_modified(&self)
pub fn mark_saved(&self)
pub fn is_analysis_changed(&self) -> bool
pub fn is_database_backed(&self) -> bool
pub fn is_database_backed_for_view_type<S: BnStrCompatible>( &self, view_type: S, ) -> bool
pub fn run_undoable_transaction<F: FnOnce() -> Result<T, E>, T, E>( &self, func: F, ) -> Result<T, E>
pub fn begin_undo_actions(&self, anonymous_allowed: bool) -> BnString
pub fn commit_undo_actions<S: BnStrCompatible>(&self, id: S)
pub fn revert_undo_actions<S: BnStrCompatible>(&self, id: S)
pub fn undo(&self)
pub fn redo(&self)
pub fn current_view(&self) -> BnString
pub fn current_offset(&self) -> u64
pub fn view_of_type<S: BnStrCompatible>( &self, view: S, ) -> Option<Ref<BinaryView>>
pub fn view_types(&self) -> Array<BnString>
sourcepub fn project_file(&self) -> Option<Ref<ProjectFile>>
pub fn project_file(&self) -> Option<Ref<ProjectFile>>
Get the ProjectFile
for the FileMetadata
.
pub fn create_database(&self, file_path: impl AsRef<Path>) -> bool
pub fn create_database_with_progress<S: BnStrCompatible, P: ProgressCallback>( &self, file_path: impl AsRef<Path>, progress: P, ) -> bool
pub fn save_auto_snapshot(&self) -> bool
pub fn open_database_for_configuration<S: BnStrCompatible>( &self, filename: S, ) -> Result<Ref<BinaryView>, ()>
pub fn open_database<S: BnStrCompatible>( &self, filename: S, ) -> Result<Ref<BinaryView>, ()>
pub fn open_database_with_progress<S: BnStrCompatible, P: ProgressCallback>( &self, filename: S, progress: P, ) -> Result<Ref<BinaryView>, ()>
Trait Implementations§
source§impl Debug for FileMetadata
impl Debug for FileMetadata
source§impl Hash for FileMetadata
impl Hash for FileMetadata
source§impl PartialEq for FileMetadata
impl PartialEq for FileMetadata
source§impl ToOwned for FileMetadata
impl ToOwned for FileMetadata
source§type Owned = Ref<FileMetadata>
type Owned = Ref<FileMetadata>
The resulting type after obtaining ownership.
source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more
impl Eq for FileMetadata
impl Send for FileMetadata
impl StructuralPartialEq for FileMetadata
impl Sync for FileMetadata
Auto Trait Implementations§
impl Freeze for FileMetadata
impl RefUnwindSafe for FileMetadata
impl Unpin for FileMetadata
impl UnwindSafe for FileMetadata
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