pub enum ImageBase {
None,
QuestionPanel {
id: String,
},
}Expand description
How a relative image path in the source markdown is allowed to resolve.
A relative path () names no host and no scheme, so on
its own it is not renderable at all — magi’s web UI never serves files
from an arbitrary directory. The one place a relative path is meaningful
is a question’s detail, where it names one of that question’s own panel
assets, already reachable at GET /api/questions/{id}/panel/{name}. Every
other caller passes ImageBase::None, under which a relative path is
rejected exactly like a file: URL.
Variants§
None
No question backs this text, so a relative image path cannot be resolved.
QuestionPanel
This text is a question’s detail; a relative image path resolves
against that question’s panel asset route.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImageBase
impl RefUnwindSafe for ImageBase
impl Send for ImageBase
impl Sync for ImageBase
impl Unpin for ImageBase
impl UnsafeUnpin for ImageBase
impl UnwindSafe for ImageBase
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 more