Struct OpenOptionsSync
pub struct OpenOptionsSync { /* private fields */ }std only.Expand description
Options to open a file with blocking path-traversal protection.
This is the sync counterpart to OpenOptions.
Implementations§
§impl OpenOptionsSync
impl OpenOptionsSync
pub fn new() -> OpenOptionsSync
Available on crate features grpc and http only.
pub fn new() -> OpenOptionsSync
grpc and http only.Create a new set of options with every flag disabled, matching
std::fs::OpenOptions::new. Enable at least one access mode (e.g.
read) before calling open.
pub fn read(&mut self, read: bool) -> &mut OpenOptionsSync
Available on crate features grpc and http only.
pub fn read(&mut self, read: bool) -> &mut OpenOptionsSync
grpc and http only.Set the option for read access.
pub fn write(&mut self, write: bool) -> &mut OpenOptionsSync
Available on crate features grpc and http only.
pub fn write(&mut self, write: bool) -> &mut OpenOptionsSync
grpc and http only.Set the option for write access.
pub fn append(&mut self, append: bool) -> &mut OpenOptionsSync
Available on crate features grpc and http only.
pub fn append(&mut self, append: bool) -> &mut OpenOptionsSync
grpc and http only.Set the option for append mode.
pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptionsSync
Available on crate features grpc and http only.
pub fn truncate(&mut self, truncate: bool) -> &mut OpenOptionsSync
grpc and http only.Set the option for truncating a previous file.
pub fn create(&mut self, create: bool) -> &mut OpenOptionsSync
Available on crate features grpc and http only.
pub fn create(&mut self, create: bool) -> &mut OpenOptionsSync
grpc and http only.Set the option to create a new file, or open it if it already exists.
pub fn create_new(&mut self, create_new: bool) -> &mut OpenOptionsSync
Available on crate features grpc and http only.
pub fn create_new(&mut self, create_new: bool) -> &mut OpenOptionsSync
grpc and http only.Set the option to create a new file, failing if it already exists.
pub fn jail(&mut self, root: impl Into<PathBuf>) -> &mut OpenOptionsSync
Available on crate features grpc and http only.
pub fn jail(&mut self, root: impl Into<PathBuf>) -> &mut OpenOptionsSync
grpc and http only.Confine every opened path to within root.
pub fn symlinks(&mut self, policy: SymlinkPolicy) -> &mut OpenOptionsSync
Available on crate features grpc and http only.
pub fn symlinks(&mut self, policy: SymlinkPolicy) -> &mut OpenOptionsSync
grpc and http only.Set how symbolic links are treated within the jail root.
Defaults to SymlinkPolicy::RestrictToRoot. Has no effect unless a
jail root is configured.
pub fn created_file_permissions(
&mut self,
permissions: CreatedFilePermissions,
) -> &mut OpenOptionsSync
Available on crate features grpc and http only.
pub fn created_file_permissions( &mut self, permissions: CreatedFilePermissions, ) -> &mut OpenOptionsSync
grpc and http only.Set permissions used when this open operation creates a new file.
Trait Implementations§
§impl Clone for OpenOptionsSync
impl Clone for OpenOptionsSync
§fn clone(&self) -> OpenOptionsSync
fn clone(&self) -> OpenOptionsSync
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for OpenOptionsSync
impl Debug for OpenOptionsSync
§impl Default for OpenOptionsSync
impl Default for OpenOptionsSync
§fn default() -> OpenOptionsSync
fn default() -> OpenOptionsSync
Auto Trait Implementations§
impl Freeze for OpenOptionsSync
impl RefUnwindSafe for OpenOptionsSync
impl Send for OpenOptionsSync
impl Sync for OpenOptionsSync
impl Unpin for OpenOptionsSync
impl UnsafeUnpin for OpenOptionsSync
impl UnwindSafe for OpenOptionsSync
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more§impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn rama_try_from(value: T) -> Result<U, <U as RamaTryFrom<T>>::Error>
§impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
type Error = <U as RamaTryFrom<T, CrateMarker>>::Error
fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<V, F> ValueFormatter<&V> for F
impl<V, F> ValueFormatter<&V> for F
§fn format_value(writer: impl ValueWriter, value: &&V)
fn format_value(writer: impl ValueWriter, value: &&V)
value to writer§impl<V, F> ValueFormatter<Arc<V>> for F
impl<V, F> ValueFormatter<Arc<V>> for F
§fn format_value(writer: impl ValueWriter, value: &Arc<V>)
fn format_value(writer: impl ValueWriter, value: &Arc<V>)
value to writer§impl<V, F> ValueFormatter<Box<V>> for F
impl<V, F> ValueFormatter<Box<V>> for F
§fn format_value(writer: impl ValueWriter, value: &Box<V>)
fn format_value(writer: impl ValueWriter, value: &Box<V>)
value to writer§impl<V, F> ValueFormatter<Cow<'_, V>> for F
impl<V, F> ValueFormatter<Cow<'_, V>> for F
§fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)
fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)
value to writer§impl<V, F> ValueFormatter<Option<V>> for Fwhere
F: ValueFormatter<V> + ?Sized,
impl<V, F> ValueFormatter<Option<V>> for Fwhere
F: ValueFormatter<V> + ?Sized,
§fn format_value(writer: impl ValueWriter, value: &Option<V>)
fn format_value(writer: impl ValueWriter, value: &Option<V>)
value to writer