Struct net::filemanager_thread::FileManagerStore
source · struct FileManagerStore {
entries: RwLock<HashMap<Uuid, FileStoreEntry>>,
}
Expand description
File manager’s data store. It maintains a thread-safe mapping from FileID to FileStoreEntry which might have different backend implementation. Access to the content is encapsulated as methods of this struct.
Fields§
§entries: RwLock<HashMap<Uuid, FileStoreEntry>>
Implementations§
source§impl FileManagerStore
impl FileManagerStore
fn new() -> Self
sourcepub fn get_impl(
&self,
id: &Uuid,
file_token: &FileTokenCheck,
origin_in: &FileOrigin,
) -> Result<FileImpl, BlobURLStoreError>
pub fn get_impl( &self, id: &Uuid, file_token: &FileTokenCheck, origin_in: &FileOrigin, ) -> Result<FileImpl, BlobURLStoreError>
Copy out the file backend implementation content
pub fn invalidate_token(&self, token: &FileTokenCheck, file_id: &Uuid)
pub fn get_token_for_file(&self, file_id: &Uuid) -> FileTokenCheck
fn insert(&self, id: Uuid, entry: FileStoreEntry)
fn remove(&self, id: &Uuid)
fn inc_ref( &self, id: &Uuid, origin_in: &FileOrigin, ) -> Result<(), BlobURLStoreError>
fn add_sliced_url_entry( &self, parent_id: Uuid, rel_pos: RelativePos, sender: IpcSender<Result<Uuid, BlobURLStoreError>>, origin_in: FileOrigin, )
fn query_files_from_embedder( &self, patterns: Vec<FilterPattern>, multiple_files: bool, embedder_proxy: EmbedderProxy, ) -> Option<Vec<String>>
fn select_file( &self, patterns: Vec<FilterPattern>, sender: IpcSender<FileManagerResult<SelectedFile>>, origin: FileOrigin, opt_test_path: Option<String>, embedder_proxy: EmbedderProxy, )
fn select_files( &self, patterns: Vec<FilterPattern>, sender: IpcSender<FileManagerResult<Vec<SelectedFile>>>, origin: FileOrigin, opt_test_paths: Option<Vec<String>>, embedder_proxy: EmbedderProxy, )
fn create_entry( &self, file_path: &Path, origin: &str, ) -> Result<SelectedFile, FileManagerThreadError>
fn get_blob_buf( &self, sender: &IpcSender<FileManagerResult<ReadFileProgress>>, id: &Uuid, file_token: &FileTokenCheck, origin_in: &FileOrigin, rel_pos: RelativePos, ) -> Result<(), BlobURLStoreError>
fn try_read_file( &self, sender: &IpcSender<FileManagerResult<ReadFileProgress>>, id: Uuid, origin_in: FileOrigin, ) -> Result<(), BlobURLStoreError>
fn dec_ref( &self, id: &Uuid, origin_in: &FileOrigin, ) -> Result<(), BlobURLStoreError>
fn promote_memory( &self, id: Uuid, blob_buf: BlobBuf, set_valid: bool, origin: FileOrigin, )
fn set_blob_url_validity( &self, validity: bool, id: &Uuid, origin_in: &FileOrigin, ) -> Result<(), BlobURLStoreError>
Auto Trait Implementations§
impl !Freeze for FileManagerStore
impl RefUnwindSafe for FileManagerStore
impl Send for FileManagerStore
impl Sync for FileManagerStore
impl Unpin for FileManagerStore
impl UnwindSafe for FileManagerStore
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert