pub struct Documents { /* private fields */ }Implementations§
Source§impl Documents
impl Documents
Sourcepub fn open(&self, path: &Path) -> Result<Document, AppError>
pub fn open(&self, path: &Path) -> Result<Document, AppError>
Call only after native selection, explicit local path submission, or an authorized project request.
pub fn open_at(&self, root: &Path, relative: &str) -> Result<Document, AppError>
pub fn open_link(&self, id: &str, href: &str) -> Result<Document, AppError>
pub fn link_relative(&self, id: &str, href: &str) -> Result<String, AppError>
pub fn resolve_link( &self, id: &str, href: &str, ) -> Result<DocumentLink, AppError>
Sourcepub fn file_link(&self, id: &str, href: &str) -> Result<String, AppError>
pub fn file_link(&self, id: &str, href: &str) -> Result<String, AppError>
Resolve an authorized browser file without publishing a resource-server URL.
pub fn read(&self, id: &str) -> Result<Document, AppError>
pub fn save( &self, id: &str, content: &str, expected_revision: &str, ) -> Result<Document, AppError>
pub fn resource(&self, id: &str, relative: &str) -> Result<PathBuf, AppError>
pub fn close(&self, id: &str)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Documents
impl Forget for Documents
impl Move for Documents
impl RefUnwindSafe for Documents
impl Send for Documents
impl Sync for Documents
impl Unpin for Documents
impl UnsafeUnpin for Documentswhere
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(String, Grant)>: UnsafeUnpin,
impl UnwindSafe for Documents
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.