pub struct Preview {
pub external_opens: ExternalOpens,
pub browsers: Arc<Browsers>,
pub documents: Arc<Documents>,
pub packets: Packets,
pub cookie_imports: Arc<Imports>,
/* private fields */
}Fields§
§external_opens: ExternalOpens§browsers: Arc<Browsers>§documents: Arc<Documents>§packets: PacketsImplementations§
Source§impl Preview
impl Preview
pub fn set_external_open_signal( &self, signal: impl Fn() + Send + Sync + 'static, )
pub fn queue_external_document( &self, path: &str, ) -> Result<OpenReceipt, AppError>
pub fn take_external_documents(&self) -> Result<Vec<OpenedDocument>, AppError>
Source§impl Preview
impl Preview
pub fn start_automation(self: &Arc<Self>) -> Result<(), AppError>
pub fn open_document(&self, path: &Path) -> Result<OpenedDocument, AppError>
Sourcepub fn open_document_path(
&self,
input: &str,
) -> Result<OpenedDocument, AppError>
pub fn open_document_path( &self, input: &str, ) -> Result<OpenedDocument, AppError>
Open an explicitly submitted local path, independently of registered projects.
pub fn open_at( &self, root: &Path, relative: &str, ) -> Result<OpenedDocument, AppError>
pub fn open_link( &self, id: &str, href: &str, ) -> Result<LinkedResource, AppError>
pub fn resource_link(&self, id: &str, href: &str) -> Result<String, AppError>
pub fn capture_rendered( &self, html: &str, width: u32, height: u32, profile: &str, full: bool, clip: Option<Value>, ) -> Result<String, AppError>
pub fn clear(&self)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Preview
impl Forget for Preview
impl Move for Preview
impl RefUnwindSafe for Previewwhere
Mutex<Vec<OpenedDocument>>: RefUnwindSafe,
Mutex<Option<Arc<dyn Fn() + Sync + Send>>>: RefUnwindSafe,
Atomic<usize>: RefUnwindSafe,
Mutex<HashMap<String, Grant>>: RefUnwindSafe,
Atomic<u16>: RefUnwindSafe,
Mutex<State>: RefUnwindSafe,
Mutex<()>: RefUnwindSafe,
Mutex<Option<Automation>>: RefUnwindSafe,
Mutex<Vec<(TempDir, usize)>>: RefUnwindSafe,
Mutex<HashMap<String, Batch>>: RefUnwindSafe,
Mutex<Option<Assets>>: RefUnwindSafe,
Atomic<bool>: RefUnwindSafe,
impl Send for Preview
impl Sync for Preview
impl Unpin for Preview
impl UnsafeUnpin for Previewwhere
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<OpenedDocument>: UnsafeUnpin,
*const ArcInner<dyn Fn() + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn() + Sync + Send>>: UnsafeUnpin,
*const ArcInner<Browsers> is !null: UnsafeUnpin,
PhantomData<ArcInner<Browsers>>: UnsafeUnpin,
*const ArcInner<Atomic<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,
*const ArcInner<Inner> is !null: UnsafeUnpin,
PhantomData<ArcInner<Inner>>: UnsafeUnpin,
*const ArcInner<Packet<'static, ()>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Packet<'static, ()>>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<Documents> is !null: UnsafeUnpin,
PhantomData<ArcInner<Documents>>: UnsafeUnpin,
PhantomData<(TempDir, usize)>: UnsafeUnpin,
*const ArcInner<Imports> is !null: UnsafeUnpin,
PhantomData<ArcInner<Imports>>: UnsafeUnpin,
impl UnwindSafe for Previewwhere
Mutex<Vec<OpenedDocument>>: UnwindSafe,
Mutex<Option<Arc<dyn Fn() + Sync + Send>>>: UnwindSafe,
Arc<Browsers>: UnwindSafe,
Mutex<Option<Automation>>: UnwindSafe,
Arc<Documents>: UnwindSafe,
RawVecInner: UnwindSafe,
Mutex<Vec<(TempDir, usize)>>: UnwindSafe,
Arc<Imports>: UnwindSafe,
Mutex<Option<Assets>>: UnwindSafe,
Align1<u8>: 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.