pub struct Reference {
pub from_file: PathBuf,
pub from_symbol: Option<String>,
pub to_name: String,
pub line: u32,
}Expand description
A reference from one symbol to another.
§Examples
use std::path::PathBuf;
use argus_repomap::parser::Reference;
let reference = Reference {
from_file: PathBuf::from("src/main.rs"),
from_symbol: Some("main".into()),
to_name: "Config".into(),
line: 5,
};
assert_eq!(reference.to_name, "Config");Fields§
§from_file: PathBufFile containing the reference.
from_symbol: Option<String>Enclosing symbol name, if any.
to_name: StringReferenced identifier name.
line: u32Line where the reference occurs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Reference
impl RefUnwindSafe for Reference
impl Send for Reference
impl Sync for Reference
impl Unpin for Reference
impl UnsafeUnpin for Reference
impl UnwindSafe for Reference
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