doc(aya): Improve the description of `take_link` methods

Don't mix the tenses.
reviewable/pr1094/r1
Michal Rostecki 2 months ago
parent bf2164c92f
commit 85c73af1fe

@ -99,10 +99,11 @@ impl CgroupDevice {
}
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`CgroupDeviceLink`] is dropped, the link is
/// detached.
pub fn take_link(
&mut self,
link_id: CgroupDeviceLinkId,

@ -125,10 +125,11 @@ impl CgroupSkb {
}
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`CgroupSkbLink`] is dropped, the link is
/// detached.
pub fn take_link(&mut self, link_id: CgroupSkbLinkId) -> Result<CgroupSkbLink, ProgramError> {
self.data.take_link(link_id)
}

@ -103,10 +103,11 @@ impl CgroupSock {
}
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`CgroupSockLink`] is dropped, the link is
/// detached.
pub fn take_link(&mut self, link_id: CgroupSockLinkId) -> Result<CgroupSockLink, ProgramError> {
self.data.take_link(link_id)
}

@ -104,10 +104,11 @@ impl CgroupSockAddr {
}
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`CgroupSockAddrLink`] is dropped, the link is
/// detached.
pub fn take_link(
&mut self,
link_id: CgroupSockAddrLinkId,

@ -103,10 +103,11 @@ impl CgroupSockopt {
}
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`CgroupSockoptLink`] is dropped, the link is
/// detached.
pub fn take_link(
&mut self,
link_id: CgroupSockoptLinkId,

@ -98,10 +98,11 @@ impl CgroupSysctl {
}
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`CgroupSysctlLink`] is dropped, the link is
/// detached.
pub fn take_link(
&mut self,
link_id: CgroupSysctlLinkId,

@ -160,10 +160,11 @@ impl Extension {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`ExtensionLink`] is dropped, the link is
/// detached.
pub fn take_link(&mut self, link_id: ExtensionLinkId) -> Result<ExtensionLink, ProgramError> {
self.data.take_link(link_id)
}

@ -75,10 +75,11 @@ impl FEntry {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`FEntryLink`] is dropped, the link is
/// detached.
pub fn take_link(&mut self, link_id: FEntryLinkId) -> Result<FEntryLink, ProgramError> {
self.data.take_link(link_id)
}

@ -75,10 +75,10 @@ impl FExit {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned `FExitLink` is dropped, the link is detached.
pub fn take_link(&mut self, link_id: FExitLinkId) -> Result<FExitLink, ProgramError> {
self.data.take_link(link_id)
}

@ -88,10 +88,11 @@ impl KProbe {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`KProbeLink`] is dropped, the link is
/// detached.
pub fn take_link(&mut self, link_id: KProbeLinkId) -> Result<KProbeLink, ProgramError> {
self.data.take_link(link_id)
}

@ -89,10 +89,10 @@ impl LircMode2 {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`LircLink`] is dropped, the link is detached.
pub fn take_link(&mut self, link_id: LircLinkId) -> Result<LircLink, ProgramError> {
self.data.take_link(link_id)
}

@ -81,10 +81,10 @@ impl Lsm {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`LsmLink`] is dropped, the link is detached.
pub fn take_link(&mut self, link_id: LsmLinkId) -> Result<LsmLink, ProgramError> {
self.data.take_link(link_id)
}

@ -191,10 +191,11 @@ impl PerfEvent {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`PerfEventLink`] is dropped, the link is
/// detached.
pub fn take_link(&mut self, link_id: PerfEventLinkId) -> Result<PerfEventLink, ProgramError> {
self.data.take_link(link_id)
}

@ -60,10 +60,11 @@ impl RawTracePoint {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`RawTracePointLink`] is dropped, the link is
/// detached.
pub fn take_link(
&mut self,
link_id: RawTracePointLinkId,

@ -82,10 +82,11 @@ impl SkLookup {
.insert(SkLookupLink::new(FdLink::new(link_fd)))
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`SkLookupLink`] is dropped, the link is
/// detached.
pub fn take_link(&mut self, link_id: SkLookupLinkId) -> Result<SkLookupLink, ProgramError> {
self.data.take_link(link_id)
}

@ -97,10 +97,11 @@ impl SkMsg {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`SkMsgLink`] is dropped, the link is
/// detached.
pub fn take_link(&mut self, link_id: SkMsgLinkId) -> Result<SkMsgLink, ProgramError> {
self.data.take_link(link_id)
}

@ -103,10 +103,10 @@ impl SkSkb {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`SkSkbLink`] is dropped, the link is detached.
pub fn take_link(&mut self, link_id: SkSkbLinkId) -> Result<SkSkbLink, ProgramError> {
self.data.take_link(link_id)
}

@ -100,10 +100,11 @@ impl SockOps {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`SockOpsLink`] is dropped, the link is
/// detached.
pub fn take_link(&mut self, link_id: SockOpsLinkId) -> Result<SockOpsLink, ProgramError> {
self.data.take_link(link_id)
}

@ -105,10 +105,11 @@ impl SocketFilter {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`SocketFilterLink`] is dropped, the link is
/// detached.
pub fn take_link(
&mut self,
link_id: SocketFilterLinkId,

@ -322,10 +322,11 @@ impl SchedClassifier {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`SchedClassifierLink`] is dropped, the link is
/// detached.
pub fn take_link(
&mut self,
link_id: SchedClassifierLinkId,

@ -79,10 +79,11 @@ impl BtfTracePoint {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`BtfTracePointLink`] is dropped, the link is
/// detached.
pub fn take_link(
&mut self,
link_id: BtfTracePointLinkId,

@ -89,10 +89,11 @@ impl TracePoint {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`TracePointLink`] is dropped, the link is
/// detached.
pub fn take_link(&mut self, link_id: TracePointLinkId) -> Result<TracePointLink, ProgramError> {
self.data.take_link(link_id)
}

@ -104,10 +104,11 @@ impl UProbe {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`UProbeLink`] is dropped, the link is
/// detached.
pub fn take_link(&mut self, link_id: UProbeLinkId) -> Result<UProbeLink, ProgramError> {
self.data.take_link(link_id)
}

@ -197,10 +197,10 @@ impl Xdp {
self.data.links.remove(link_id)
}
/// Takes ownership of the link referenced by the provided link_id.
/// Takes ownership of the link referenced by the provided `link_id`.
///
/// The link will be detached on `Drop` and the caller is now responsible
/// for managing its lifetime.
/// The caller takes the responsibility of managing the lifetime of the
/// link. When the returned [`XdpLink`] is dropped, the link is detached.
pub fn take_link(&mut self, link_id: XdpLinkId) -> Result<XdpLink, ProgramError> {
self.data.take_link(link_id)
}

Loading…
Cancel
Save