pub enum Root {
Dir(PathBuf),
Url(Url),
}Expand description
Where a session’s relative paths resolve: its root.
The root travels with the session, as an extension of its
SessionConfig (set_root, with_root), so two sessions in one
process can each have their own.
- No root: natively, a relative path is relative to the process’s working directory, as the CLI has always read it. The browser has no working directory, so there a relative path is an error.
Root::Dir: a directory, natively (ursa serve DIR).'edges.csv'isDIR/edges.csv. Reads are not confined: an absolute path,~/…or a URL reads what it names, as anywhere else in the native engine. Writes are:COPY … TOand.outputwrite only under the root (write_target), andINSERT INTOa table of files only into files under it (check_write).Root::Url: a URL, such as the browser shell’shttps://…/data/. A relative path, or an absolute one (/data/x.csv), is joined to it as a browser joins a link. It confines no write: a browser writes only the session’s own files (crate::session_files).
Variants§
Dir(PathBuf)
A directory. A relative one is made absolute (against the working directory) when it is set.
Url(Url)
A URL. One that names a directory ends in /, as in a browser.
Trait Implementations§
impl Eq for Root
impl StructuralPartialEq for Root
Auto Trait Implementations§
impl Forget for Root
impl Freeze for Root
impl Move for Root
impl RefUnwindSafe for Root
impl Send for Root
impl Sync for Root
impl Unpin for Root
impl UnsafeUnpin for Root
impl UnwindSafe for Root
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 more