pub struct ProjectReference { /* private fields */ }Expand description
Represents a reference to another .NET project.
Implementations§
Source§impl ProjectReference
impl ProjectReference
Sourcepub fn new(name: String, path: PathBuf) -> Self
pub fn new(name: String, path: PathBuf) -> Self
Creates a new ProjectReference instance with the specified name and path.
§Arguments
name- The name of the referenced project.path- The path to the referenced project file.
§Examples
use dotnet_lens::ProjectReference;
use std::path::PathBuf;
let project_ref = ProjectReference::new("OtherProject".to_string(), PathBuf::from("path/to/OtherProject.csproj"));
println!("Project Name: {}", project_ref.name());
println!("Project Path: {:?}", project_ref.path());Sourcepub fn name(&self) -> &String
pub fn name(&self) -> &String
Returns the name of the referenced project.
§Examples
use dotnet_lens::ProjectReference;
use std::path::PathBuf;
let project_ref = ProjectReference::new("OtherProject".to_string(), PathBuf::from("path/to/OtherProject.csproj"));
println!("Project Name: {}", project_ref.name());Sourcepub fn path(&self) -> &Path
pub fn path(&self) -> &Path
Returns the path to the referenced project file.
§Examples
use dotnet_lens::ProjectReference;
use std::path::PathBuf;
let project_ref = ProjectReference::new("OtherProject".to_string(), PathBuf::from("path/to/OtherProject.csproj"));
println!("Project Path: {:?}", project_ref.path());Trait Implementations§
Source§impl Clone for ProjectReference
impl Clone for ProjectReference
Source§fn clone(&self) -> ProjectReference
fn clone(&self) -> ProjectReference
Returns a duplicate 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 ProjectReference
impl Debug for ProjectReference
Source§impl Default for ProjectReference
impl Default for ProjectReference
Source§fn default() -> ProjectReference
fn default() -> ProjectReference
Returns the “default value” for a type. Read more
Source§impl PartialEq for ProjectReference
impl PartialEq for ProjectReference
impl StructuralPartialEq for ProjectReference
Auto Trait Implementations§
impl Freeze for ProjectReference
impl RefUnwindSafe for ProjectReference
impl Send for ProjectReference
impl Sync for ProjectReference
impl Unpin for ProjectReference
impl UnwindSafe for ProjectReference
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