pub enum UrlStyle {
File,
Server,
Negotiated,
}Expand description
URL style for cross-references (Perl --urlstyle; Config.pm accepts
server, negotiated, file). Selects how CrossRef’s URL generation
rewrites a generated cross-reference URL for the serving environment.
Variants§
File
Keep the full file.html#fragment — nothing stripped. Correct for
file:// viewing and servers that do not rewrite index.html.
Server
Strip a trailing index.ext so a directory index links as dir/
(Perl’s latexml default; for servers that serve dir/ → dir/index.ext).
Negotiated
Content negotiation: strip the .ext extension AND a trailing index
(for servers that hide the extension, e.g. BookML’s --urlstyle=negotiated).
Implementations§
Source§impl UrlStyle
impl UrlStyle
Sourcepub fn from_cli(s: &str) -> Option<Self>
pub fn from_cli(s: &str) -> Option<Self>
Parse a CLI --urlstyle value. Returns None for an unrecognized value
(the caller reports it, mirroring Perl _checkOptionValue).
Sourcepub fn as_cli(self) -> &'static str
pub fn as_cli(self) -> &'static str
The canonical CLI tag — round-trips through UrlStyle::from_cli. Used to
serialize the style across the parallel page-render worker manifest.
Trait Implementations§
impl Copy for UrlStyle
impl Eq for UrlStyle
impl StructuralPartialEq for UrlStyle
Auto Trait Implementations§
impl Freeze for UrlStyle
impl RefUnwindSafe for UrlStyle
impl Send for UrlStyle
impl Sync for UrlStyle
impl Unpin for UrlStyle
impl UnsafeUnpin for UrlStyle
impl UnwindSafe for UrlStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.