[][src]Trait gcmodule::Trace

pub trait Trace: 'static {
    fn trace(&self, tracer: &mut Tracer) { ... }
fn is_type_tracked(&self) -> bool { ... }
fn as_any(&self) -> Option<&dyn Any> { ... } }

Defines how the cycle collector should collect a type.

Provided methods

fn trace(&self, tracer: &mut Tracer)

Traverse through values referred by this value.

For example, if self.x is a value referred by self, call self.x.trace(tracer).

Do not call the trace function directly.

fn is_type_tracked(&self) -> bool

Whether this type should be tracked by the cycle collector. This provides an optimization that makes atomic types opt out the cycle collector.

This is ideally an associated constant. However that is currently impossible due to compiler limitations. See https://doc.rust-lang.org/error-index.html#E0038.

fn as_any(&self) -> Option<&dyn Any>

Provide downcast support.

Types that wants downcast support should implement this method like: fn as_any(&self) -> Option<&dyn std::any::Any> { Some(self) }

Loading content...

Implementations on Foreign Types

impl Trace for bool[src]

impl Trace for char[src]

impl Trace for f32[src]

impl Trace for f64[src]

impl Trace for i16[src]

impl Trace for i32[src]

impl Trace for i64[src]

impl Trace for i8[src]

impl Trace for isize[src]

impl Trace for u16[src]

impl Trace for u32[src]

impl Trace for u64[src]

impl Trace for u8[src]

impl Trace for usize[src]

impl Trace for ()[src]

impl Trace for String[src]

impl Trace for &'static str[src]

impl<T: Trace + ?Sized> Trace for Box<T>[src]

impl<T: Copy + Trace> Trace for Cell<T>[src]

impl<T: Trace> Trace for RefCell<T>[src]

impl<K: 'static, V: Trace> Trace for BTreeMap<K, V>[src]

impl<K: Eq + Hash + Trace, V: Trace> Trace for HashMap<K, V>[src]

impl<T: Trace> Trace for LinkedList<T>[src]

impl<T: Trace> Trace for VecDeque<T>[src]

impl<T: Trace> Trace for Vec<T>[src]

impl<X: 'static> Trace for fn() -> X[src]

impl<A: 'static, X: 'static> Trace for fn(_: A) -> X[src]

impl<A: 'static, B: 'static, X: 'static> Trace for fn(_: A, _: B) -> X[src]

impl<A: 'static, B: 'static, C: 'static, X: 'static> Trace for fn(_: A, _: B, _: C) -> X[src]

impl<A: 'static, B: 'static, C: 'static, D: 'static, X: 'static> Trace for fn(_: A, _: B, _: C, _: D) -> X[src]

impl<A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, X: 'static> Trace for fn(_: A, _: B, _: C, _: D, _: E) -> X[src]

impl<A: 'static, B: 'static, C: 'static, D: 'static, E: 'static, F: 'static, X: 'static> Trace for fn(_: A, _: B, _: C, _: D, _: E, _: F) -> X[src]

impl Trace for CString[src]

impl Trace for NulError[src]

impl Trace for OsString[src]

impl Trace for AddrParseError[src]

impl Trace for Ipv4Addr[src]

impl Trace for Ipv6Addr[src]

impl Trace for SocketAddrV4[src]

impl Trace for SocketAddrV6[src]

impl Trace for TcpListener[src]

impl Trace for TcpStream[src]

impl Trace for UdpSocket[src]

impl<T: Trace> Trace for Option<T>[src]

impl Trace for PathBuf[src]

impl Trace for Child[src]

impl Trace for ChildStderr[src]

impl Trace for ChildStdin[src]

impl Trace for ChildStdout[src]

impl Trace for Command[src]

impl Trace for ExitStatus[src]

impl Trace for Output[src]

impl Trace for Stdio[src]

impl<T: 'static> Trace for Rc<T>[src]

impl<T: 'static> Trace for Weak<T>[src]

impl<T: Trace, U: Trace> Trace for Result<T, U>[src]

impl<T: 'static> Trace for Arc<T>[src]

impl<T: 'static> Trace for Mutex<T>[src]

impl<T: 'static> Trace for RwLock<T>[src]

impl<T: 'static> Trace for JoinHandle<T>[src]

impl<T: 'static> Trace for LocalKey<T>[src]

impl Trace for Thread[src]

Loading content...

Implementors

impl<T: Trace + ?Sized> Trace for Cc<T>[src]

Loading content...