/*
* Copyright (c) godot-rust; Bromeon and contributors.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
use crate;
/// Obtain owned `Gd` from either `&self` or `&Gd`.
///
/// This trait allows passing either `Gd<T>` or `C` (where `C: WithBaseField`) to functions that need an owned `Gd<T>`.
///
/// This is primarily used for signal connection methods in [`TypedSignal`][crate::obj::signal::TypedSignal] and
/// [`ConnectBuilder`][crate::obj::signal::ConnectBuilder], where you can pass either a `&Gd` (outside) or `&SomeClass`
/// (from within `impl` block) as the receiver object.
///
/// # Similar traits
/// - [`UniformObjectDeref`][crate::meta::UniformObjectDeref] provides unified dereferencing of user and engine classes.
/// - [`AsArg`][crate::meta::AsArg] enables general argument conversions for Godot APIs.