Skip to main content

Command

Struct Command 

Source
pub struct Command<'a, T: Id> {
    pub code: u32,
    pub data: u64,
    pub error: u32,
    /* private fields */
}
Expand description

The Rust-flavored, FFI-friendly version of struct sev_issue_cmd which is used to pass arguments to the CSV ioctl implementation.

This struct is defined in the Linux kernel: include/uapi/linux/psp-sev.h

Fields§

§code: u32§data: u64§error: u32

Implementations§

Source§

impl<'a, T: Id> Command<'a, T>

Source

pub fn from_mut(subcmd: &'a mut T) -> Self

Create an CSV command with the expectation that the host platform/kernel will write to the caller’s address space either to the data held in the Command.subcmd field or some other region specified by the Command.subcmd field.

Source

pub fn from(subcmd: &'a T) -> Self

Create an CSV command with the expectation that the host platform/kernel WILL NOT mutate the caller’s address space in its response. Note: this does not actually prevent the host platform/kernel from writing to the caller’s address space if it wants to. This is primarily a semantic tool for programming against the CSV ioctl API.

Auto Trait Implementations§

§

impl<'a, T> Freeze for Command<'a, T>

§

impl<'a, T> RefUnwindSafe for Command<'a, T>
where T: RefUnwindSafe,

§

impl<'a, T> Send for Command<'a, T>
where T: Sync,

§

impl<'a, T> Sync for Command<'a, T>
where T: Sync,

§

impl<'a, T> Unpin for Command<'a, T>

§

impl<'a, T> UnsafeUnpin for Command<'a, T>

§

impl<'a, T> UnwindSafe for Command<'a, T>
where T: RefUnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,