pub struct FileManager {
    embedder_proxy: EmbedderProxy,
    store: Arc<FileManagerStore>,
    thread_pool: Weak<ThreadPool>,
}Fields§
§embedder_proxy: EmbedderProxy§store: Arc<FileManagerStore>§thread_pool: Weak<ThreadPool>Implementations§
Source§impl FileManager
 
impl FileManager
pub fn new( embedder_proxy: EmbedderProxy, pool_handle: Weak<ThreadPool>, ) -> FileManager
pub fn read_file( &self, sender: IpcSender<FileManagerResult<ReadFileProgress>>, id: Uuid, origin: FileOrigin, )
pub fn get_token_for_file(&self, file_id: &Uuid) -> FileTokenCheck
pub fn invalidate_token(&self, token: &FileTokenCheck, file_id: &Uuid)
Sourcepub fn fetch_file(
    &self,
    done_sender: &mut TokioSender<Data>,
    cancellation_listener: Arc<CancellationListener>,
    id: Uuid,
    file_token: &FileTokenCheck,
    origin: FileOrigin,
    response: &mut Response,
    range: Option<Range>,
) -> Result<(), BlobURLStoreError>
 
pub fn fetch_file( &self, done_sender: &mut TokioSender<Data>, cancellation_listener: Arc<CancellationListener>, id: Uuid, file_token: &FileTokenCheck, origin: FileOrigin, response: &mut Response, range: Option<Range>, ) -> Result<(), BlobURLStoreError>
Read a file for the Fetch implementation. It gets the required headers synchronously and reads the actual content in a separate thread.
pub fn promote_memory( &self, id: Uuid, blob_buf: BlobBuf, set_valid: bool, origin: FileOrigin, )
Sourcepub fn handle(&self, msg: FileManagerThreadMsg)
 
pub fn handle(&self, msg: FileManagerThreadMsg)
Message handler
pub fn fetch_file_in_chunks( &self, done_sender: &mut TokioSender<Data>, reader: BufReader<File>, res_body: ServoArc<Mutex<ResponseBody>>, cancellation_listener: Arc<CancellationListener>, range: RelativePos, )
fn fetch_blob_buf( &self, done_sender: &mut TokioSender<Data>, cancellation_listener: Arc<CancellationListener>, id: &Uuid, file_token: &FileTokenCheck, origin_in: &FileOrigin, bounds: BlobBounds, response: &mut Response, ) -> Result<(), BlobURLStoreError>
Trait Implementations§
Source§impl Clone for FileManager
 
impl Clone for FileManager
Source§fn clone(&self) -> FileManager
 
fn clone(&self) -> FileManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreAuto Trait Implementations§
impl Freeze for FileManager
impl !RefUnwindSafe for FileManager
impl Send for FileManager
impl !Sync for FileManager
impl Unpin for FileManager
impl !UnwindSafe for FileManager
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> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
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