pub enum OwnedArgument<Id, NewId = Id> {
Int(i32),
Uint(u32),
Fixed(i32),
Str(Option<Box<String>>),
Object(Id),
NewId(NewId),
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<String>>)
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(NewId)
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, NewId> Debug for OwnedArgument<Id, NewId>
impl<Id, NewId> Debug for OwnedArgument<Id, NewId>
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,
Auto Trait Implementations§
impl<Id, NewId> Freeze for OwnedArgument<Id, NewId>
impl<Id, NewId> RefUnwindSafe for OwnedArgument<Id, NewId>where
Id: RefUnwindSafe,
NewId: RefUnwindSafe,
impl<Id, NewId> Send for OwnedArgument<Id, NewId>
impl<Id, NewId> Sync for OwnedArgument<Id, NewId>
impl<Id, NewId> Unpin for OwnedArgument<Id, NewId>
impl<Id, NewId> UnsafeUnpin for OwnedArgument<Id, NewId>where
Id: UnsafeUnpin,
NewId: UnsafeUnpin,
impl<Id, NewId> UnwindSafe for OwnedArgument<Id, NewId>where
Id: UnwindSafe,
NewId: 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