pub trait Borrow<Borrowed>where
Borrowed: ?Sized,{
// Required method
fn borrow(&self) -> &Borrowed;
}wayland and Linux only.Expand description
A trait for borrowing data.
In Rust, it is common to provide different representations of a type for
different use cases. For instance, storage location and management for a
value can be specifically chosen as appropriate for a particular use via
pointer types such as Box<T> or Rc<T>. Beyond these generic
wrappers that can be used with any type, some types provide optional
facets providing potentially costly functionality. An example for such a
type is String which adds the ability to extend a string to the basic
str. This requires keeping additional information unnecessary for a
simple, immutable string.
These types provide access to the underlying data through references
to the type of that data. They are said to be ‘borrowed as’ that type.
For instance, a Box<T> can be borrowed as T while a String
can be borrowed as str.
Types express that they can be borrowed as some type T by implementing
Borrow<T>, providing a reference to a T in the trait’s
borrow method. A type is free to borrow as several different types.
If it wishes to mutably borrow as the type, allowing the underlying data
to be modified, it can additionally implement BorrowMut<T>.
Further, when providing implementations for additional traits, it needs
to be considered whether they should behave identically to those of the
underlying type as a consequence of acting as a representation of that
underlying type. Generic code typically uses Borrow<T> when it relies
on the identical behavior of these additional trait implementations.
These traits will likely appear as additional trait bounds.
In particular Eq, Ord and Hash must be equivalent for
borrowed and owned values: x.borrow() == y.borrow() should give the
same result as x == y.
If generic code merely needs to work for all types that can
provide a reference to related type T, it is often better to use
AsRef<T> as more types can safely implement it.
§Examples
As a data collection, HashMap<K, V> owns both keys and values. If
the key’s actual data is wrapped in a managing type of some kind, it
should, however, still be possible to search for a value using a
reference to the key’s data. For instance, if the key is a string, then
it is likely stored with the hash map as a String, while it should
be possible to search using a &str. Thus, insert needs to
operate on a String while get needs to be able to use a &str.
Slightly simplified, the relevant parts of HashMap<K, V> look like
this:
use std::borrow::Borrow;
use std::hash::Hash;
pub struct HashMap<K, V> {
// fields omitted
}
impl<K, V> HashMap<K, V> {
pub fn insert(&self, key: K, value: V) -> Option<V>
where K: Hash + Eq
{
// ...
}
pub fn get<Q>(&self, k: &Q) -> Option<&V>
where
K: Borrow<Q>,
Q: Hash + Eq + ?Sized
{
// ...
}
}The entire hash map is generic over a key type K. Because these keys
are stored with the hash map, this type has to own the key’s data.
When inserting a key-value pair, the map is given such a K and needs
to find the correct hash bucket and check if the key is already present
based on that K. It therefore requires K: Hash + Eq.
When searching for a value in the map, however, having to provide a
reference to a K as the key to search for would require to always
create such an owned value. For string keys, this would mean a String
value needs to be created just for the search for cases where only a
str is available.
Instead, the get method is generic over the type of the underlying key
data, called Q in the method signature above. It states that K
borrows as a Q by requiring that K: Borrow<Q>. By additionally
requiring Q: Hash + Eq, it signals the requirement that K and Q
have implementations of the Hash and Eq traits that produce identical
results.
The implementation of get relies in particular on identical
implementations of Hash by determining the key’s hash bucket by calling
Hash::hash on the Q value even though it inserted the key based on
the hash value calculated from the K value.
As a consequence, the hash map breaks if a K wrapping a Q value
produces a different hash than Q. For instance, imagine you have a
type that wraps a string but compares ASCII letters ignoring their case:
pub struct CaseInsensitiveString(String);
impl PartialEq for CaseInsensitiveString {
fn eq(&self, other: &Self) -> bool {
self.0.eq_ignore_ascii_case(&other.0)
}
}
impl Eq for CaseInsensitiveString { }Because two equal values need to produce the same hash value, the
implementation of Hash needs to ignore ASCII case, too:
impl Hash for CaseInsensitiveString {
fn hash<H: Hasher>(&self, state: &mut H) {
for c in self.0.as_bytes() {
c.to_ascii_lowercase().hash(state)
}
}
}Can CaseInsensitiveString implement Borrow<str>? It certainly can
provide a reference to a string slice via its contained owned string.
But because its Hash implementation differs, it behaves differently
from str and therefore must not, in fact, implement Borrow<str>.
If it wants to allow others access to the underlying str, it can do
that via AsRef<str> which doesn’t carry any extra requirements.
Required Methods§
Implementors§
impl Borrow<RawDisplayHandle> for DisplayHandle<'_>
impl Borrow<RawWindowHandle> for WindowHandle<'_>
impl Borrow<str> for SmolStr
impl Borrow<str> for String
impl Borrow<str> for BusName<'_>
impl Borrow<str> for ErrorName<'_>
impl Borrow<str> for Guid<'_>
impl Borrow<str> for InlinedName
impl Borrow<str> for InterfaceName<'_>
impl Borrow<str> for MemberName<'_>
impl Borrow<str> for OwnedBusName
impl Borrow<str> for OwnedErrorName
impl Borrow<str> for OwnedGuid
impl Borrow<str> for OwnedInterfaceName
impl Borrow<str> for OwnedMemberName
impl Borrow<str> for OwnedPropertyName
impl Borrow<str> for OwnedUniqueName
impl Borrow<str> for OwnedWellKnownName
impl Borrow<str> for PropertyName<'_>
impl Borrow<str> for UniqueName<'_>
impl Borrow<str> for WellKnownName<'_>
impl Borrow<ObjectId> for cosmic::cctk::cosmic_protocols::a11y::v1::client::cosmic_a11y_manager_v1::CosmicA11yManagerV1
impl Borrow<ObjectId> for cosmic::cctk::cosmic_protocols::corner_radius::v1::client::cosmic_corner_radius_manager_v1::CosmicCornerRadiusManagerV1
impl Borrow<ObjectId> for cosmic::cctk::cosmic_protocols::corner_radius::v1::client::cosmic_corner_radius_toplevel_v1::CosmicCornerRadiusToplevelV1
impl Borrow<ObjectId> for cosmic::cctk::cosmic_protocols::image_capture_source::v1::client::zcosmic_workspace_image_capture_source_manager_v1::ZcosmicWorkspaceImageCaptureSourceManagerV1
impl Borrow<ObjectId> for cosmic::cctk::cosmic_protocols::output_management::v1::client::zcosmic_output_configuration_head_v1::ZcosmicOutputConfigurationHeadV1
impl Borrow<ObjectId> for cosmic::cctk::cosmic_protocols::output_management::v1::client::zcosmic_output_configuration_v1::ZcosmicOutputConfigurationV1
impl Borrow<ObjectId> for cosmic::cctk::cosmic_protocols::output_management::v1::client::zcosmic_output_head_v1::ZcosmicOutputHeadV1
impl Borrow<ObjectId> for cosmic::cctk::cosmic_protocols::output_management::v1::client::zcosmic_output_manager_v1::ZcosmicOutputManagerV1
impl Borrow<ObjectId> for cosmic::cctk::cosmic_protocols::overlap_notify::v1::client::zcosmic_overlap_notification_v1::ZcosmicOverlapNotificationV1
impl Borrow<ObjectId> for cosmic::cctk::cosmic_protocols::overlap_notify::v1::client::zcosmic_overlap_notify_v1::ZcosmicOverlapNotifyV1
impl Borrow<ObjectId> for cosmic::cctk::cosmic_protocols::toplevel_info::v1::client::zcosmic_toplevel_handle_v1::ZcosmicToplevelHandleV1
impl Borrow<ObjectId> for cosmic::cctk::cosmic_protocols::toplevel_info::v1::client::zcosmic_toplevel_info_v1::ZcosmicToplevelInfoV1
impl Borrow<ObjectId> for cosmic::cctk::cosmic_protocols::toplevel_management::v1::client::zcosmic_toplevel_manager_v1::ZcosmicToplevelManagerV1
impl Borrow<ObjectId> for cosmic::cctk::cosmic_protocols::workspace::v2::client::zcosmic_workspace_handle_v2::ZcosmicWorkspaceHandleV2
impl Borrow<ObjectId> for cosmic::cctk::cosmic_protocols::workspace::v2::client::zcosmic_workspace_manager_v2::ZcosmicWorkspaceManagerV2
impl Borrow<ObjectId> for ZwpInputMethodV2
impl Borrow<ObjectId> for XxInputMethodV1
impl Borrow<ObjectId> for XxInputPopupPositionerV1
impl Borrow<ObjectId> for XxInputPopupSurfaceV2
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::background_effect::v1::client::ext_background_effect_manager_v1::ExtBackgroundEffectManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::background_effect::v1::client::ext_background_effect_surface_v1::ExtBackgroundEffectSurfaceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::data_control::v1::client::ext_data_control_device_v1::ExtDataControlDeviceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::data_control::v1::client::ext_data_control_manager_v1::ExtDataControlManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::data_control::v1::client::ext_data_control_offer_v1::ExtDataControlOfferV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::data_control::v1::client::ext_data_control_source_v1::ExtDataControlSourceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::foreign_toplevel_list::v1::client::ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::foreign_toplevel_list::v1::client::ext_foreign_toplevel_list_v1::ExtForeignToplevelListV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::idle_notify::v1::client::ext_idle_notification_v1::ExtIdleNotificationV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::idle_notify::v1::client::ext_idle_notifier_v1::ExtIdleNotifierV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::image_capture_source::v1::client::ext_foreign_toplevel_image_capture_source_manager_v1::ExtForeignToplevelImageCaptureSourceManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::image_capture_source::v1::client::ext_image_capture_source_v1::ExtImageCaptureSourceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::image_capture_source::v1::client::ext_output_image_capture_source_manager_v1::ExtOutputImageCaptureSourceManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::image_copy_capture::v1::client::ext_image_copy_capture_cursor_session_v1::ExtImageCopyCaptureCursorSessionV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::image_copy_capture::v1::client::ext_image_copy_capture_frame_v1::ExtImageCopyCaptureFrameV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::image_copy_capture::v1::client::ext_image_copy_capture_manager_v1::ExtImageCopyCaptureManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::image_copy_capture::v1::client::ext_image_copy_capture_session_v1::ExtImageCopyCaptureSessionV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::session_lock::v1::client::ext_session_lock_manager_v1::ExtSessionLockManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::session_lock::v1::client::ext_session_lock_surface_v1::ExtSessionLockSurfaceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::session_lock::v1::client::ext_session_lock_v1::ExtSessionLockV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::transient_seat::v1::client::ext_transient_seat_manager_v1::ExtTransientSeatManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::transient_seat::v1::client::ext_transient_seat_v1::ExtTransientSeatV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::workspace::v1::client::ext_workspace_group_handle_v1::ExtWorkspaceGroupHandleV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::workspace::v1::client::ext_workspace_handle_v1::ExtWorkspaceHandleV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::ext::workspace::v1::client::ext_workspace_manager_v1::ExtWorkspaceManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::alpha_modifier::v1::client::wp_alpha_modifier_surface_v1::WpAlphaModifierSurfaceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::alpha_modifier::v1::client::wp_alpha_modifier_v1::WpAlphaModifierV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::color_management::v1::client::wp_color_management_output_v1::WpColorManagementOutputV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::color_management::v1::client::wp_color_management_surface_feedback_v1::WpColorManagementSurfaceFeedbackV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::color_management::v1::client::wp_color_management_surface_v1::WpColorManagementSurfaceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::color_management::v1::client::wp_color_manager_v1::WpColorManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::color_management::v1::client::wp_image_description_creator_icc_v1::WpImageDescriptionCreatorIccV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::color_management::v1::client::wp_image_description_creator_params_v1::WpImageDescriptionCreatorParamsV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::color_management::v1::client::wp_image_description_info_v1::WpImageDescriptionInfoV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::color_management::v1::client::wp_image_description_reference_v1::WpImageDescriptionReferenceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::color_management::v1::client::wp_image_description_v1::WpImageDescriptionV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::color_representation::v1::client::wp_color_representation_manager_v1::WpColorRepresentationManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::color_representation::v1::client::wp_color_representation_surface_v1::WpColorRepresentationSurfaceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::commit_timing::v1::client::wp_commit_timer_v1::WpCommitTimerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::commit_timing::v1::client::wp_commit_timing_manager_v1::WpCommitTimingManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::content_type::v1::client::wp_content_type_manager_v1::WpContentTypeManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::content_type::v1::client::wp_content_type_v1::WpContentTypeV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::cursor_shape::v1::client::wp_cursor_shape_device_v1::WpCursorShapeDeviceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::cursor_shape::v1::client::wp_cursor_shape_manager_v1::WpCursorShapeManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::drm_lease::v1::client::wp_drm_lease_connector_v1::WpDrmLeaseConnectorV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::drm_lease::v1::client::wp_drm_lease_device_v1::WpDrmLeaseDeviceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::drm_lease::v1::client::wp_drm_lease_request_v1::WpDrmLeaseRequestV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::drm_lease::v1::client::wp_drm_lease_v1::WpDrmLeaseV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::fifo::v1::client::wp_fifo_manager_v1::WpFifoManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::fifo::v1::client::wp_fifo_v1::WpFifoV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::fractional_scale::v1::client::wp_fractional_scale_manager_v1::WpFractionalScaleManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::fractional_scale::v1::client::wp_fractional_scale_v1::WpFractionalScaleV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::fullscreen_shell::zv1::client::zwp_fullscreen_shell_mode_feedback_v1::ZwpFullscreenShellModeFeedbackV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::fullscreen_shell::zv1::client::zwp_fullscreen_shell_v1::ZwpFullscreenShellV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::idle_inhibit::zv1::client::zwp_idle_inhibit_manager_v1::ZwpIdleInhibitManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::idle_inhibit::zv1::client::zwp_idle_inhibitor_v1::ZwpIdleInhibitorV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::input_method::zv1::client::zwp_input_method_context_v1::ZwpInputMethodContextV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::input_method::zv1::client::zwp_input_method_v1::ZwpInputMethodV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::input_method::zv1::client::zwp_input_panel_surface_v1::ZwpInputPanelSurfaceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::input_method::zv1::client::zwp_input_panel_v1::ZwpInputPanelV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::input_timestamps::zv1::client::zwp_input_timestamps_manager_v1::ZwpInputTimestampsManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::input_timestamps::zv1::client::zwp_input_timestamps_v1::ZwpInputTimestampsV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::keyboard_shortcuts_inhibit::zv1::client::zwp_keyboard_shortcuts_inhibit_manager_v1::ZwpKeyboardShortcutsInhibitManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::keyboard_shortcuts_inhibit::zv1::client::zwp_keyboard_shortcuts_inhibitor_v1::ZwpKeyboardShortcutsInhibitorV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::linux_dmabuf::zv1::client::zwp_linux_buffer_params_v1::ZwpLinuxBufferParamsV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::linux_dmabuf::zv1::client::zwp_linux_dmabuf_feedback_v1::ZwpLinuxDmabufFeedbackV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::linux_dmabuf::zv1::client::zwp_linux_dmabuf_v1::ZwpLinuxDmabufV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::linux_drm_syncobj::v1::client::wp_linux_drm_syncobj_manager_v1::WpLinuxDrmSyncobjManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::linux_drm_syncobj::v1::client::wp_linux_drm_syncobj_surface_v1::WpLinuxDrmSyncobjSurfaceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::linux_drm_syncobj::v1::client::wp_linux_drm_syncobj_timeline_v1::WpLinuxDrmSyncobjTimelineV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::linux_explicit_synchronization::zv1::client::zwp_linux_buffer_release_v1::ZwpLinuxBufferReleaseV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::linux_explicit_synchronization::zv1::client::zwp_linux_explicit_synchronization_v1::ZwpLinuxExplicitSynchronizationV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::linux_explicit_synchronization::zv1::client::zwp_linux_surface_synchronization_v1::ZwpLinuxSurfaceSynchronizationV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::pointer_constraints::zv1::client::zwp_confined_pointer_v1::ZwpConfinedPointerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::pointer_constraints::zv1::client::zwp_locked_pointer_v1::ZwpLockedPointerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::pointer_constraints::zv1::client::zwp_pointer_constraints_v1::ZwpPointerConstraintsV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::pointer_gestures::zv1::client::zwp_pointer_gesture_hold_v1::ZwpPointerGestureHoldV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::pointer_gestures::zv1::client::zwp_pointer_gesture_pinch_v1::ZwpPointerGesturePinchV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::pointer_gestures::zv1::client::zwp_pointer_gesture_swipe_v1::ZwpPointerGestureSwipeV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::pointer_gestures::zv1::client::zwp_pointer_gestures_v1::ZwpPointerGesturesV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::pointer_warp::v1::client::wp_pointer_warp_v1::WpPointerWarpV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::presentation_time::client::wp_presentation::WpPresentation
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::presentation_time::client::wp_presentation_feedback::WpPresentationFeedback
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::primary_selection::zv1::client::zwp_primary_selection_device_manager_v1::ZwpPrimarySelectionDeviceManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::primary_selection::zv1::client::zwp_primary_selection_device_v1::ZwpPrimarySelectionDeviceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::primary_selection::zv1::client::zwp_primary_selection_offer_v1::ZwpPrimarySelectionOfferV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::primary_selection::zv1::client::zwp_primary_selection_source_v1::ZwpPrimarySelectionSourceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::relative_pointer::zv1::client::zwp_relative_pointer_manager_v1::ZwpRelativePointerManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::relative_pointer::zv1::client::zwp_relative_pointer_v1::ZwpRelativePointerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::security_context::v1::client::wp_security_context_manager_v1::WpSecurityContextManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::security_context::v1::client::wp_security_context_v1::WpSecurityContextV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::single_pixel_buffer::v1::client::wp_single_pixel_buffer_manager_v1::WpSinglePixelBufferManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::tablet::zv1::client::zwp_tablet_manager_v1::ZwpTabletManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::tablet::zv1::client::zwp_tablet_seat_v1::ZwpTabletSeatV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::tablet::zv1::client::zwp_tablet_tool_v1::ZwpTabletToolV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::tablet::zv1::client::zwp_tablet_v1::ZwpTabletV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::tablet::zv2::client::zwp_tablet_manager_v2::ZwpTabletManagerV2
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::tablet::zv2::client::zwp_tablet_pad_dial_v2::ZwpTabletPadDialV2
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::tablet::zv2::client::zwp_tablet_pad_group_v2::ZwpTabletPadGroupV2
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::tablet::zv2::client::zwp_tablet_pad_ring_v2::ZwpTabletPadRingV2
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::tablet::zv2::client::zwp_tablet_pad_strip_v2::ZwpTabletPadStripV2
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::tablet::zv2::client::zwp_tablet_pad_v2::ZwpTabletPadV2
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::tablet::zv2::client::zwp_tablet_seat_v2::ZwpTabletSeatV2
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::tablet::zv2::client::zwp_tablet_tool_v2::ZwpTabletToolV2
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::tablet::zv2::client::zwp_tablet_v2::ZwpTabletV2
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::tearing_control::v1::client::wp_tearing_control_manager_v1::WpTearingControlManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::tearing_control::v1::client::wp_tearing_control_v1::WpTearingControlV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::text_input::zv1::client::zwp_text_input_manager_v1::ZwpTextInputManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::text_input::zv1::client::zwp_text_input_v1::ZwpTextInputV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::text_input::zv3::client::zwp_text_input_manager_v3::ZwpTextInputManagerV3
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::text_input::zv3::client::zwp_text_input_v3::ZwpTextInputV3
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::viewporter::client::wp_viewport::WpViewport
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::wp::viewporter::client::wp_viewporter::WpViewporter
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::activation::v1::client::xdg_activation_token_v1::XdgActivationTokenV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::activation::v1::client::xdg_activation_v1::XdgActivationV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::decoration::zv1::client::zxdg_decoration_manager_v1::ZxdgDecorationManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::decoration::zv1::client::zxdg_toplevel_decoration_v1::ZxdgToplevelDecorationV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::dialog::v1::client::xdg_dialog_v1::XdgDialogV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::dialog::v1::client::xdg_wm_dialog_v1::XdgWmDialogV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::foreign::zv1::client::zxdg_exported_v1::ZxdgExportedV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::foreign::zv1::client::zxdg_exporter_v1::ZxdgExporterV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::foreign::zv1::client::zxdg_imported_v1::ZxdgImportedV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::foreign::zv1::client::zxdg_importer_v1::ZxdgImporterV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::foreign::zv2::client::zxdg_exported_v2::ZxdgExportedV2
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::foreign::zv2::client::zxdg_exporter_v2::ZxdgExporterV2
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::foreign::zv2::client::zxdg_imported_v2::ZxdgImportedV2
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::foreign::zv2::client::zxdg_importer_v2::ZxdgImporterV2
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::shell::client::xdg_popup::XdgPopup
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::shell::client::xdg_positioner::XdgPositioner
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::shell::client::xdg_surface::XdgSurface
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::shell::client::xdg_toplevel::XdgToplevel
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::shell::client::xdg_wm_base::XdgWmBase
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::system_bell::v1::client::xdg_system_bell_v1::XdgSystemBellV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::toplevel_drag::v1::client::xdg_toplevel_drag_manager_v1::XdgToplevelDragManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::toplevel_drag::v1::client::xdg_toplevel_drag_v1::XdgToplevelDragV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::toplevel_icon::v1::client::xdg_toplevel_icon_manager_v1::XdgToplevelIconManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::toplevel_icon::v1::client::xdg_toplevel_icon_v1::XdgToplevelIconV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::toplevel_tag::v1::client::xdg_toplevel_tag_manager_v1::XdgToplevelTagManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::xdg_output::zv1::client::zxdg_output_manager_v1::ZxdgOutputManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xdg::xdg_output::zv1::client::zxdg_output_v1::ZxdgOutputV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xwayland::keyboard_grab::zv1::client::zwp_xwayland_keyboard_grab_manager_v1::ZwpXwaylandKeyboardGrabManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xwayland::keyboard_grab::zv1::client::zwp_xwayland_keyboard_grab_v1::ZwpXwaylandKeyboardGrabV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xwayland::shell::v1::client::xwayland_shell_v1::XwaylandShellV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols::xwayland::shell::v1::client::xwayland_surface_v1::XwaylandSurfaceV1
impl Borrow<ObjectId> for XxInputMethodManagerV2
impl Borrow<ObjectId> for XxSessionManagerV1
impl Borrow<ObjectId> for XxSessionV1
impl Borrow<ObjectId> for XxToplevelSessionV1
impl Borrow<ObjectId> for GtkPrimarySelectionDevice
impl Borrow<ObjectId> for GtkPrimarySelectionDeviceManager
impl Borrow<ObjectId> for GtkPrimarySelectionOffer
impl Borrow<ObjectId> for GtkPrimarySelectionSource
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_misc::server_decoration::client::org_kde_kwin_server_decoration::OrgKdeKwinServerDecoration
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_misc::server_decoration::client::org_kde_kwin_server_decoration_manager::OrgKdeKwinServerDecorationManager
impl Borrow<ObjectId> for ZwpInputMethodKeyboardGrabV2
impl Borrow<ObjectId> for ZwpInputMethodManagerV2
impl Borrow<ObjectId> for ZwpInputPopupSurfaceV2
impl Borrow<ObjectId> for ZwpVirtualKeyboardManagerV1
impl Borrow<ObjectId> for ZwpVirtualKeyboardV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::data_control::v1::client::zwlr_data_control_device_v1::ZwlrDataControlDeviceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::data_control::v1::client::zwlr_data_control_manager_v1::ZwlrDataControlManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::data_control::v1::client::zwlr_data_control_offer_v1::ZwlrDataControlOfferV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::data_control::v1::client::zwlr_data_control_source_v1::ZwlrDataControlSourceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::export_dmabuf::v1::client::zwlr_export_dmabuf_frame_v1::ZwlrExportDmabufFrameV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::export_dmabuf::v1::client::zwlr_export_dmabuf_manager_v1::ZwlrExportDmabufManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::foreign_toplevel::v1::client::zwlr_foreign_toplevel_handle_v1::ZwlrForeignToplevelHandleV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::foreign_toplevel::v1::client::zwlr_foreign_toplevel_manager_v1::ZwlrForeignToplevelManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::gamma_control::v1::client::zwlr_gamma_control_manager_v1::ZwlrGammaControlManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::gamma_control::v1::client::zwlr_gamma_control_v1::ZwlrGammaControlV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::input_inhibitor::v1::client::zwlr_input_inhibit_manager_v1::ZwlrInputInhibitManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::input_inhibitor::v1::client::zwlr_input_inhibitor_v1::ZwlrInputInhibitorV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::layer_shell::v1::client::zwlr_layer_shell_v1::ZwlrLayerShellV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::layer_shell::v1::client::zwlr_layer_surface_v1::ZwlrLayerSurfaceV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::output_management::v1::client::zwlr_output_configuration_head_v1::ZwlrOutputConfigurationHeadV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::output_management::v1::client::zwlr_output_configuration_v1::ZwlrOutputConfigurationV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::output_management::v1::client::zwlr_output_head_v1::ZwlrOutputHeadV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::output_management::v1::client::zwlr_output_manager_v1::ZwlrOutputManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::output_management::v1::client::zwlr_output_mode_v1::ZwlrOutputModeV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::output_power_management::v1::client::zwlr_output_power_manager_v1::ZwlrOutputPowerManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::output_power_management::v1::client::zwlr_output_power_v1::ZwlrOutputPowerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::screencopy::v1::client::zwlr_screencopy_frame_v1::ZwlrScreencopyFrameV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::screencopy::v1::client::zwlr_screencopy_manager_v1::ZwlrScreencopyManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::virtual_pointer::v1::client::zwlr_virtual_pointer_manager_v1::ZwlrVirtualPointerManagerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::protocols_wlr::virtual_pointer::v1::client::zwlr_virtual_pointer_v1::ZwlrVirtualPointerV1
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_buffer::WlBuffer
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_callback::WlCallback
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_compositor::WlCompositor
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_data_device::WlDataDevice
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_data_device_manager::WlDataDeviceManager
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_data_offer::WlDataOffer
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_data_source::WlDataSource
impl Borrow<ObjectId> for WlDisplay
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_fixes::WlFixes
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_keyboard::WlKeyboard
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_output::WlOutput
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_pointer::WlPointer
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_region::WlRegion
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_registry::WlRegistry
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_seat::WlSeat
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_shell::WlShell
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_shell_surface::WlShellSurface
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_shm::WlShm
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_shm_pool::WlShmPool
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_subcompositor::WlSubcompositor
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_subsurface::WlSubsurface
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_surface::WlSurface
impl Borrow<ObjectId> for cosmic::cctk::sctk::reexports::client::protocol::wl_touch::WlTouch
impl Borrow<ObjectId> for KdeAutoHideScreenEdgeV1
impl Borrow<ObjectId> for KdeExternalBrightnessDeviceV1
impl Borrow<ObjectId> for KdeExternalBrightnessV1
impl Borrow<ObjectId> for KdeLockscreenOverlayV1
impl Borrow<ObjectId> for KdeOutputConfigurationV2
impl Borrow<ObjectId> for KdeOutputDeviceModeV2
impl Borrow<ObjectId> for KdeOutputDeviceV2
impl Borrow<ObjectId> for KdeOutputManagementV2
impl Borrow<ObjectId> for KdeOutputOrderV1
impl Borrow<ObjectId> for KdePrimaryOutputV1
impl Borrow<ObjectId> for KdeScreenEdgeManagerV1
impl Borrow<ObjectId> for OrgKdeKwinBlur
impl Borrow<ObjectId> for OrgKdeKwinBlurManager
impl Borrow<ObjectId> for OrgKdeKwinContrast
impl Borrow<ObjectId> for OrgKdeKwinContrastManager
impl Borrow<ObjectId> for OrgKdeKwinDpms
impl Borrow<ObjectId> for OrgKdeKwinDpmsManager
impl Borrow<ObjectId> for OrgKdeKwinFakeInput
impl Borrow<ObjectId> for OrgKdeKwinIdle
impl Borrow<ObjectId> for OrgKdeKwinIdleTimeout
impl Borrow<ObjectId> for OrgKdeKwinKeystate
impl Borrow<ObjectId> for OrgKdeKwinOutputconfiguration
impl Borrow<ObjectId> for OrgKdeKwinOutputdevice
impl Borrow<ObjectId> for OrgKdeKwinOutputmanagement
impl Borrow<ObjectId> for OrgKdeKwinRemoteAccessManager
impl Borrow<ObjectId> for OrgKdeKwinRemoteBuffer
impl Borrow<ObjectId> for OrgKdeKwinServerDecoration
impl Borrow<ObjectId> for OrgKdeKwinServerDecorationManager
impl Borrow<ObjectId> for OrgKdeKwinServerDecorationPalette
impl Borrow<ObjectId> for OrgKdeKwinServerDecorationPaletteManager
impl Borrow<ObjectId> for OrgKdeKwinShadow
impl Borrow<ObjectId> for OrgKdeKwinShadowManager
impl Borrow<ObjectId> for OrgKdeKwinSlide
impl Borrow<ObjectId> for OrgKdeKwinSlideManager
impl Borrow<ObjectId> for OrgKdePlasmaActivation
impl Borrow<ObjectId> for OrgKdePlasmaActivationFeedback
impl Borrow<ObjectId> for OrgKdePlasmaShell
impl Borrow<ObjectId> for OrgKdePlasmaStackingOrder
impl Borrow<ObjectId> for OrgKdePlasmaSurface
impl Borrow<ObjectId> for OrgKdePlasmaVirtualDesktop
impl Borrow<ObjectId> for OrgKdePlasmaVirtualDesktopManagement
impl Borrow<ObjectId> for OrgKdePlasmaWindow
impl Borrow<ObjectId> for OrgKdePlasmaWindowManagement
impl Borrow<ObjectId> for QtExtendedSurface
impl Borrow<ObjectId> for QtSurfaceExtension
impl Borrow<ObjectId> for WlEglstreamController
impl Borrow<ObjectId> for WlFullscreenShell
impl Borrow<ObjectId> for WlFullscreenShellModeFeedback
impl Borrow<ObjectId> for WlTextInput
impl Borrow<ObjectId> for WlTextInputManager
impl Borrow<ObjectId> for ZkdeScreencastStreamUnstableV1
impl Borrow<ObjectId> for ZkdeScreencastUnstableV1
impl Borrow<ObjectId> for ZwpTextInputManagerV2
impl Borrow<ObjectId> for ZwpTextInputV2
impl Borrow<ByteStr> for ByteString
impl Borrow<CStr> for CString
impl Borrow<OsStr> for OsString
impl Borrow<Path> for PathBuf
impl Borrow<Uuid> for Braced
impl Borrow<Uuid> for Hyphenated
impl Borrow<Uuid> for Simple
impl Borrow<Uuid> for Urn
impl Borrow<BStr> for str
impl Borrow<BStr> for String
impl Borrow<BStr> for Vec<u8>
alloc only.impl Borrow<BStr> for Vec<u8>
impl Borrow<BStr> for BString
impl Borrow<BStr> for [u8]
impl Borrow<Bytes> for Vec<u8>
alloc only.