From 10ae859627f20481306329443f6e4acca34ffb4b Mon Sep 17 00:00:00 2001 From: Andrew Stoycos Date: Wed, 3 May 2023 12:05:30 -0400 Subject: [PATCH] Add FdLink documentation Signed-off-by: Andrew Stoycos --- aya/src/programs/links.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aya/src/programs/links.rs b/aya/src/programs/links.rs index 7e66af46..dfdd17d1 100644 --- a/aya/src/programs/links.rs +++ b/aya/src/programs/links.rs @@ -81,7 +81,12 @@ impl Drop for LinkMap { #[derive(Debug, Hash, Eq, PartialEq)] pub struct FdLinkId(pub(crate) RawFd); -/// A file descriptor link. +/// FdLink is a generic file descriptor link. +/// +/// FdLinks can be pinned in order to keep probes attached and running after the loading +/// process closes. Additionally many program specific links can be converted into +/// FdLinks by using either into() or try_into() implementations. For examples of such functions +/// see [`TracePointLink::try_from()`](crate::programs::trace_point::TracePointLink::try_from()) and [`FdLink::try_from()`]. #[derive(Debug)] pub struct FdLink { pub(crate) fd: RawFd,