magenta 0.1.1

Rust bindings for the Magenta kernel
Documentation
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

//! Type-safe bindings for Magenta process.

use {HandleBase, Handle, HandleRef};

/// An object representing a Magenta process.
///
/// As essentially a subtype of `Handle`, it can be freely interconverted.
#[derive(Debug, Eq, PartialEq)]
pub struct Process(Handle);

impl HandleBase for Process {
    fn get_ref(&self) -> HandleRef {
        self.0.get_ref()
    }

    fn from_handle(handle: Handle) -> Self {
        Process(handle)
    }
}