[go: up one dir, main page]

Trait Cookied

Source
pub trait Cookied: HandleBased {
    // Provided methods
    fn get_cookie(&self, scope: &HandleRef<'_>) -> Result<u64, Status> { ... }
    fn set_cookie(
        &self,
        scope: &HandleRef<'_>,
        cookie: u64,
    ) -> Result<(), Status> { ... }
}
Expand description

A trait implemented by all handles for objects which can have a cookie attached.

Provided Methods§

Get the cookie attached to this object, if any. Wraps the zx_object_get_cookie syscall.

Attach an opaque cookie to this object with the given scope. The cookie may be read or changed in future only with the same scope. Wraps the zx_object_set_cookie syscall.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§