pub struct SignedUrl {
pub original_url: String,
pub digest: String,
pub encoded_url: String,
pub encoding: Encoding,
}Expand description
A signed Camo URL ready for use
Fields§
§original_url: StringThe original URL that was signed
digest: StringThe HMAC-SHA1 digest
encoded_url: StringThe encoded URL
encoding: EncodingThe encoding format used
Implementations§
Source§impl SignedUrl
impl SignedUrl
Sourcepub fn to_url(&self, base: &str) -> String
pub fn to_url(&self, base: &str) -> String
Generate the full proxy URL with a base URL
§Example
use camo::CamoUrl;
let camo = CamoUrl::new("secret");
let url = camo.sign("http://example.com/image.png")
.to_url("https://camo.example.com");Trait Implementations§
Auto Trait Implementations§
impl Freeze for SignedUrl
impl RefUnwindSafe for SignedUrl
impl Send for SignedUrl
impl Sync for SignedUrl
impl Unpin for SignedUrl
impl UnwindSafe for SignedUrl
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