pub enum OwnedArgument<Id> {
Int(i32),
Uint(u32),
Fixed(i32),
Str(Option<Box<CString>>),
Object(Id),
NewId(Id),
Array(Box<Vec<u8>>),
Fd(OwnedFd),
}Expand description
Enum of possible argument of the protocol
Variants§
Int(i32)
An integer argument. Represented by a i32.
Uint(u32)
An unsigned integer argument. Represented by a u32.
Fixed(i32)
A signed fixed point number with 1/256 precision
Str(Option<Box<CString>>)
CString
The value is boxed to reduce the stack size of Argument. The performance
impact is negligible as string arguments are pretty rare in the protocol.
Object(Id)
Id of a wayland object
NewId(Id)
Id of a newly created wayland object
Array(Box<Vec<u8>>)
Vec<u8>
The value is boxed to reduce the stack size of Argument. The performance
impact is negligible as array arguments are pretty rare in the protocol.
Fd(OwnedFd)
A file descriptor argument. Represented by a OwnedFd.
Trait Implementations§
Source§impl<Id> Debug for OwnedArgument<Id>where
Id: Debug,
impl<Id> Debug for OwnedArgument<Id>where
Id: Debug,
Source§impl<Id> Display for OwnedArgument<Id>where
Id: Display,
impl<Id> Display for OwnedArgument<Id>where
Id: Display,
impl<Id> Eq for OwnedArgument<Id>where
Id: Eq,
Source§impl<Id> PartialEq for OwnedArgument<Id>where
Id: PartialEq,
impl<Id> PartialEq for OwnedArgument<Id>where
Id: PartialEq,
Source§fn eq(&self, other: &OwnedArgument<Id>) -> bool
fn eq(&self, other: &OwnedArgument<Id>) -> bool
Tests for
self and other values to be equal, and is used by ==.Auto Trait Implementations§
impl<Id> Freeze for OwnedArgument<Id>where
Id: Freeze,
impl<Id> RefUnwindSafe for OwnedArgument<Id>where
Id: RefUnwindSafe,
impl<Id> Send for OwnedArgument<Id>where
Id: Send,
impl<Id> Sync for OwnedArgument<Id>where
Id: Sync,
impl<Id> Unpin for OwnedArgument<Id>where
Id: Unpin,
impl<Id> UnsafeUnpin for OwnedArgument<Id>where
Id: UnsafeUnpin,
impl<Id> UnwindSafe for OwnedArgument<Id>where
Id: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more