pub struct ImportedCall {
pub module: String,
pub export: String,
pub arguments: Vec<ConfigValue>,
pub template: Option<String>,
}Expand description
A call, or a tagged template, of a function a module exports; see extract_imported_calls.
Fields§
§module: StringThe module the function comes from.
export: StringThe export called: "default" for the default export or the module object itself (pino(…)), the export’s
name for a named import (execa(…)), or the member called on the module object (pino.transport(…)).
arguments: Vec<ConfigValue>The statically evaluated arguments, in order. For a call that runs a command (extract_command_calls), the
cwd option of an options object is left out when it names the directory the call runs in anyway
(process.cwd(), '.', undefined), and starts with FILE_DIR when the file’s own location computes it.
A tagged template has none, except that one run in another directory by a chained .cwd(dir) (Bun Shell’s
$`…`.cwd(dir)) has an options object with that cwd, marked the same way. Such a call also marks each
string of the entrypoints array of an options object (Bun.build) that the file’s own location computes
(path.join(import.meta.dir, 'src/x.ts')): it starts with FILE_DIR and /, followed by the path relative
to the file’s directory.
template: Option<String>For a tagged template ($`cmd ${x}`), its raw text with every substitution replaced by
TEMPLATE_SUBSTITUTION; None for a call.
Trait Implementations§
Source§impl Clone for ImportedCall
impl Clone for ImportedCall
Source§impl Debug for ImportedCall
impl Debug for ImportedCall
Source§impl PartialEq for ImportedCall
impl PartialEq for ImportedCall
impl StructuralPartialEq for ImportedCall
Auto Trait Implementations§
impl Forget for ImportedCall
impl Freeze for ImportedCall
impl Move for ImportedCall
impl RefUnwindSafe for ImportedCall
impl Send for ImportedCall
impl Sync for ImportedCall
impl Unpin for ImportedCall
impl UnsafeUnpin for ImportedCall
impl UnwindSafe for ImportedCall
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
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> ErasedDestructor for Twhere
T: 'static,
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