pub struct Source { /* private fields */ }Implementations
sourceimpl Source
impl Source
pub fn new(url: Option<String>, key: Option<String>) -> Self
pub fn request(
&self,
method: Method,
url: &str,
buffer: Option<&[u8]>
) -> Result<ReqwestResponse, ReqwestError>
pub fn from_file(self, path: &Path) -> Result<Self, TinifyException>
pub fn from_buffer(self, buffer: &[u8]) -> Self
pub fn from_url(self, url: &str) -> Result<Self, TinifyException>
pub fn get_source_from_response(self, response: ReqwestResponse) -> Self
pub fn to_file(&self, path: &str) -> Result<()>
pub fn to_buffer(&self) -> Vec<u8>
Trait Implementations
impl Eq for Source
impl StructuralEq for Source
impl StructuralPartialEq for Source
Auto Trait Implementations
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.