pub struct RequestSpec { /* private fields */ }Expand description
A request spec is the middle-part of a FRED request Uri with the base part removed from the left and the API key removed from the right.
Implementations§
Source§impl RequestSpec
impl RequestSpec
Sourcepub fn new(mid_part: &str, api_key: Option<&str>) -> Result<Self>
pub fn new(mid_part: &str, api_key: Option<&str>) -> Result<Self>
If api_key is None, checks for environment variable FRED_API_KEY, else
uses the value provided.
pub fn uri(&self) -> Result<Uri>
pub fn mid_part(&self) -> String
pub fn ivec(&self) -> IVec
pub fn has_api_key(&self) -> bool
Trait Implementations§
Source§impl Clone for RequestSpec
impl Clone for RequestSpec
Source§fn clone(&self) -> RequestSpec
fn clone(&self) -> RequestSpec
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 RequestSpec
impl Debug for RequestSpec
Auto Trait Implementations§
impl Freeze for RequestSpec
impl RefUnwindSafe for RequestSpec
impl Send for RequestSpec
impl Sync for RequestSpec
impl Unpin for RequestSpec
impl UnwindSafe for RequestSpec
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