pub struct GetResourcePathRequest {
pub ref: u32,
pub size: Option<String>,
pub generate: Option<u8>,
pub extension: Option<String>,
pub page: Option<u32>,
pub watermarked: Option<u8>,
pub alternative: Option<i32>,
pub write_metadata: Option<bool>,
}Fields§
§ref: u32The ID of the resource to generate a download URL for.
size: Option<String>Preview size to retrieve (e.g. "thm", "scr", "pre"). Omit for the original file.
generate: Option<u8>If 1, generates the preview if it does not yet exist.
extension: Option<String>Override the file extension of the returned URL.
page: Option<u32>Page number for multi-page resources (e.g. PDF).
watermarked: Option<u8>If 1, returns a URL to the watermarked version of the file.
alternative: Option<i32>ID of the alternative file to return a URL for, or -1 for the original.
write_metadata: Option<bool>If set, writes embedded metadata into the file before returning the URL.
Implementations§
Source§impl GetResourcePathRequest
impl GetResourcePathRequest
pub fn new(ref: u32) -> Self
pub fn size(self, size: impl Into<String>) -> Self
pub fn generate(self, generate: bool) -> Self
pub fn extension(self, extension: impl Into<String>) -> Self
pub fn page(self, page: u32) -> Self
pub fn watermarked(self, watermarked: bool) -> Self
pub fn alternative(self, alternative: i32) -> Self
pub fn write_metadata(self, write_metadata: bool) -> Self
Trait Implementations§
Source§impl Clone for GetResourcePathRequest
impl Clone for GetResourcePathRequest
Source§fn clone(&self) -> GetResourcePathRequest
fn clone(&self) -> GetResourcePathRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GetResourcePathRequest
impl Debug for GetResourcePathRequest
Source§impl PartialEq for GetResourcePathRequest
impl PartialEq for GetResourcePathRequest
Source§impl Serialize for GetResourcePathRequest
impl Serialize for GetResourcePathRequest
impl StructuralPartialEq for GetResourcePathRequest
Auto Trait Implementations§
impl Freeze for GetResourcePathRequest
impl RefUnwindSafe for GetResourcePathRequest
impl Send for GetResourcePathRequest
impl Sync for GetResourcePathRequest
impl Unpin for GetResourcePathRequest
impl UnsafeUnpin for GetResourcePathRequest
impl UnwindSafe for GetResourcePathRequest
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