pub struct InputsProvider {
inputs_dir: PathBuf,
provider: Box<dyn FnMut(&Path) -> Result<Box<dyn InputsGuard>> + Send>,
}Expand description
Inputs provider.
Fields§
§inputs_dir: PathBuf§provider: Box<dyn FnMut(&Path) -> Result<Box<dyn InputsGuard>> + Send>Implementations§
Source§impl InputsProvider
impl InputsProvider
fn new<TResult: Send + 'static>( inputs_dir: impl AsRef<Path>, provider: impl FnMut(&Path) -> Result<TResult> + Send + 'static, ) -> Self
Sourcepub fn provide_inputs<'a>(
&'a mut self,
path: impl AsRef<Path>,
) -> Result<Box<dyn InputsGuard + 'a>>
pub fn provide_inputs<'a>( &'a mut self, path: impl AsRef<Path>, ) -> Result<Box<dyn InputsGuard + 'a>>
This method signature artificially extends the mutable borrow of self to make sure that the method is not callable until the returned InputsGuard is dropped.
pub fn inputs_dir(&self) -> &Path
Trait Implementations§
Source§impl Default for InputsProvider
impl Default for InputsProvider
Source§impl From<SandboxSpec> for InputsProvider
impl From<SandboxSpec> for InputsProvider
Source§fn from(value: SandboxSpec) -> Self
fn from(value: SandboxSpec) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for InputsProvider
impl !RefUnwindSafe for InputsProvider
impl Send for InputsProvider
impl !Sync for InputsProvider
impl Unpin for InputsProvider
impl !UnwindSafe for InputsProvider
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request