pub struct Browsers {
pub root: PathBuf,
pub documents: Arc<Documents>,
/* private fields */
}Fields§
§root: PathBuf§documents: Arc<Documents>Implementations§
Source§impl Browsers
impl Browsers
pub fn new(root: PathBuf) -> Self
pub fn info(&self) -> Result<BrowserInfo, AppError>
pub fn create(&self, profile: &str, url: &str) -> Result<String, AppError>
pub fn create_owned( &self, profile: &str, url: &str, owner: &str, ) -> Result<String, AppError>
pub fn page(&self, id: &str) -> Result<Arc<Mutex<Page>>, AppError>
pub fn close(&self, id: &str) -> Result<(), AppError>
pub fn clear(&self)
Source§impl Browsers
impl Browsers
pub fn downloads(&self) -> Result<Vec<Download>, AppError>
pub fn cancel_download(&self, profile: &str, id: &str) -> Result<(), AppError>
Sourcepub fn forget_download(&self, profile: &str, id: &str) -> Result<(), AppError>
pub fn forget_download(&self, profile: &str, id: &str) -> Result<(), AppError>
Remove only a terminal history record; keep the downloaded file untouched.
pub fn download_path( &self, profile: &str, id: &str, ) -> Result<PathBuf, AppError>
Source§impl Browsers
impl Browsers
pub fn kernel(&self, id: &str) -> Result<Value, AppError>
pub fn frame(&self, id: &str) -> Result<Frame, AppError>
pub fn frame_since( &self, id: &str, since: Option<u64>, ) -> Result<Frame, AppError>
pub fn quick_frame( &self, id: &str, since: Option<u64>, ) -> Result<Frame, AppError>
Source§impl Browsers
impl Browsers
pub fn profiles(&self) -> Result<Vec<BrowserProfile>, AppError>
pub fn save_profile(&self, profile: BrowserProfile) -> Result<(), AppError>
pub fn delete_profile(&self, id: &str) -> Result<(), AppError>
Auto Trait Implementations§
impl !Freeze for Browsers
impl Forget for Browsers
impl Move for Browsers
impl RefUnwindSafe for Browserswhere
Atomic<usize>: RefUnwindSafe,
Mutex<HashMap<String, Grant>>: RefUnwindSafe,
Atomic<u16>: RefUnwindSafe,
Mutex<State>: RefUnwindSafe,
Mutex<()>: RefUnwindSafe,
impl Send for Browsers
impl Sync for Browsers
impl Unpin for Browserswhere
*const u8 is !null: Unpin,
Arc<Documents>: Unpin,
Align2<u16>: Unpin,
Align4<u32>: Unpin,
Align1<u8>: Unpin,
Arc<Mutex<()>>: Unpin,
Arc<Transfer>: Unpin,
Arc<Atomic<bool>>: Unpin,
Arc<Mutex<Runtime>>: Unpin,
Arc<Mutex<OwnedChild>>: Unpin,
Arc<Mutex<Page>>: Unpin,
Arc<Mutex<BrowserPageInfo>>: Unpin,
impl UnsafeUnpin for Browserswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<Documents> is !null: UnsafeUnpin,
PhantomData<ArcInner<Documents>>: UnsafeUnpin,
Align2<u16>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
PhantomData<(String, ())>: UnsafeUnpin,
PhantomData<(String, Arc<Mutex<()>>)>: UnsafeUnpin,
PhantomData<(String, Download)>: UnsafeUnpin,
PhantomData<(String, Arc<Transfer>)>: UnsafeUnpin,
PhantomData<(String, Arc<Atomic<bool>>)>: UnsafeUnpin,
PhantomData<(String, Arc<Mutex<Runtime>>)>: UnsafeUnpin,
PhantomData<(String, Arc<Mutex<OwnedChild>>)>: UnsafeUnpin,
PhantomData<((String, String), ())>: UnsafeUnpin,
PhantomData<(String, (String, String))>: UnsafeUnpin,
PhantomData<(String, Instant)>: UnsafeUnpin,
PhantomData<(String, PageHandle)>: UnsafeUnpin,
impl UnwindSafe for Browserswhere
RawVecInner: UnwindSafe,
Arc<Documents>: UnwindSafe,
Align2<u16>: UnwindSafe,
Mutex<State>: UnwindSafe,
Mutex<()>: UnwindSafe,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.