pub enum ObjectKeyPolicy {
Logical,
WindowsPortable,
}Expand description
How a relative object key should be validated.
Variants§
Logical
Security checks only: relative / paths, no traversal, no control characters.
Use this for remote-to-remote work and for local destinations on Unix-like
filesystems, where characters such as : are legal in file names.
WindowsPortable
Also reject names that cannot be created portably on Windows filesystems.
Implementations§
Source§impl ObjectKeyPolicy
impl ObjectKeyPolicy
Sourcepub fn for_local_destination(force_portable: bool) -> Self
pub fn for_local_destination(force_portable: bool) -> Self
Policy for writing an object key onto a local filesystem.
Windows destinations always use Self::WindowsPortable. Other platforms
stay on Self::Logical unless the caller requests portable names.
Sourcepub const fn for_remote_destination() -> Self
pub const fn for_remote_destination() -> Self
Policy for remote object keys. S3 does not use Windows filename rules.
Trait Implementations§
Source§impl Clone for ObjectKeyPolicy
impl Clone for ObjectKeyPolicy
Source§fn clone(&self) -> ObjectKeyPolicy
fn clone(&self) -> ObjectKeyPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ObjectKeyPolicy
Source§impl Debug for ObjectKeyPolicy
impl Debug for ObjectKeyPolicy
impl Eq for ObjectKeyPolicy
Source§impl PartialEq for ObjectKeyPolicy
impl PartialEq for ObjectKeyPolicy
impl StructuralPartialEq for ObjectKeyPolicy
Auto Trait Implementations§
impl Freeze for ObjectKeyPolicy
impl RefUnwindSafe for ObjectKeyPolicy
impl Send for ObjectKeyPolicy
impl Sync for ObjectKeyPolicy
impl Unpin for ObjectKeyPolicy
impl UnsafeUnpin for ObjectKeyPolicy
impl UnwindSafe for ObjectKeyPolicy
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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