Struct hurl::util::path::ContextDir
source · pub struct ContextDir { /* private fields */ }
Expand description
Represents the directories used to run a Hurl file.
Implementations§
source§impl ContextDir
impl ContextDir
sourcepub fn new(current_dir: &Path, file_root: &Path) -> ContextDir
pub fn new(current_dir: &Path, file_root: &Path) -> ContextDir
Returns a context directory with the given current directory and file root.
sourcepub fn resolved_path(&self, filename: &Path) -> PathBuf
pub fn resolved_path(&self, filename: &Path) -> PathBuf
Returns a path (absolute or relative), given a filename.
sourcepub fn is_access_allowed(&self, filename: &Path) -> bool
pub fn is_access_allowed(&self, filename: &Path) -> bool
Checks if a given filename
access is authorized.
This method is used to check if a local file can be included in POST request or if a
response can be outputted to a given file when using output
option in [Options] sections.
Trait Implementations§
source§impl Clone for ContextDir
impl Clone for ContextDir
source§fn clone(&self) -> ContextDir
fn clone(&self) -> ContextDir
Returns a copy 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 ContextDir
impl Debug for ContextDir
source§impl Default for ContextDir
impl Default for ContextDir
source§impl PartialEq for ContextDir
impl PartialEq for ContextDir
source§fn eq(&self, other: &ContextDir) -> bool
fn eq(&self, other: &ContextDir) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ContextDir
impl StructuralPartialEq for ContextDir
Auto Trait Implementations§
impl Freeze for ContextDir
impl RefUnwindSafe for ContextDir
impl Send for ContextDir
impl Sync for ContextDir
impl Unpin for ContextDir
impl UnwindSafe for ContextDir
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