pub struct SourceEntry {
pub name: &'static str,
pub caps: Capabilities,
pub env_var: &'static str,
pub default_base: &'static str,
pub pdf_env_var: Option<&'static str>,
pub pdf_default_base: Option<&'static str>,
pub search: Option<fn(&str, &SearchQuery) -> Result<Vec<Paper>, String>>,
pub get: Option<fn(&str, &str) -> Result<Option<Paper>, String>>,
pub pdf: Option<fn(&str, &str) -> Result<Vec<u8>, String>>,
pub cite: Option<fn(&str, &str, Direction, u32) -> Result<Vec<Paper>, String>>,
}Fields§
§name: &'static str§caps: Capabilities§env_var: &'static strEnv var that overrides default_base.
default_base: &'static str§pdf_env_var: Option<&'static str>Separate host for PDF downloads where the API and the files differ.
pdf_default_base: Option<&'static str>§search: Option<fn(&str, &SearchQuery) -> Result<Vec<Paper>, String>>§get: Option<fn(&str, &str) -> Result<Option<Paper>, String>>§pdf: Option<fn(&str, &str) -> Result<Vec<u8>, String>>§cite: Option<fn(&str, &str, Direction, u32) -> Result<Vec<Paper>, String>>Auto Trait Implementations§
impl Freeze for SourceEntry
impl RefUnwindSafe for SourceEntry
impl Send for SourceEntry
impl Sync for SourceEntry
impl Unpin for SourceEntry
impl UnsafeUnpin for SourceEntry
impl UnwindSafe for SourceEntry
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.