Enum rustc_session::config::OutFileName
source · pub enum OutFileName {
Real(PathBuf),
Stdout,
}
Variants§
Implementations§
source§impl OutFileName
impl OutFileName
pub fn parent(&self) -> Option<&Path>
pub fn filestem(&self) -> Option<&OsStr>
pub fn is_stdout(&self) -> bool
pub fn is_tty(&self) -> bool
pub fn as_path(&self) -> &Path
sourcepub fn file_for_writing(
&self,
outputs: &OutputFilenames,
flavor: OutputType,
codegen_unit_name: Option<&str>
) -> PathBuf
pub fn file_for_writing( &self, outputs: &OutputFilenames, flavor: OutputType, codegen_unit_name: Option<&str> ) -> PathBuf
For a given output filename, return the actual name of the file that
can be used to write codegen data of type flavor
. For real-path
output filenames, this would be trivial as we can just use the path.
Otherwise for stdout, return a temporary path so that the codegen data
may be later copied to stdout.
pub fn overwrite(&self, content: &str, sess: &Session)
Trait Implementations§
source§impl Clone for OutFileName
impl Clone for OutFileName
source§fn clone(&self) -> OutFileName
fn clone(&self) -> OutFileName
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 OutFileName
impl Debug for OutFileName
source§impl DepTrackingHash for OutFileName
impl DepTrackingHash for OutFileName
fn hash( &self, hasher: &mut DefaultHasher, _: ErrorOutputType, _for_crate_hash: bool )
source§impl Hash for OutFileName
impl Hash for OutFileName
source§impl<__CTX> HashStable<__CTX> for OutFileNamewhere
__CTX: HashStableContext,
impl<__CTX> HashStable<__CTX> for OutFileNamewhere __CTX: HashStableContext,
fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)
source§impl PartialEq<OutFileName> for OutFileName
impl PartialEq<OutFileName> for OutFileName
source§fn eq(&self, other: &OutFileName) -> bool
fn eq(&self, other: &OutFileName) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for OutFileName
Auto Trait Implementations§
impl RefUnwindSafe for OutFileName
impl Send for OutFileName
impl Sync for OutFileName
impl Unpin for OutFileName
impl UnwindSafe for OutFileName
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
Real
: 24 bytesStdout
: 0 bytes