pub struct VrClipboard { /* private fields */ }Expand description
Process-local clipboard storage for hosts without a system clipboard.
The initial and explicitly cleared state reads as None; writing an empty
string also restores that state. Reads return an owned clone.
§Examples
use ailloli_ui_openxr::VrClipboard;
use ailloli_ui_runtime::app::ClipboardProvider;
let clipboard = VrClipboard::new();
assert_eq!(clipboard.read_text(), None);
clipboard.write_text("XR note")?;
assert_eq!(clipboard.read_text().as_deref(), Some("XR note"));Implementations§
Trait Implementations§
Source§impl ClipboardProvider for VrClipboard
impl ClipboardProvider for VrClipboard
Source§impl Default for VrClipboard
impl Default for VrClipboard
Source§fn default() -> VrClipboard
fn default() -> VrClipboard
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for VrClipboard
impl !RefUnwindSafe for VrClipboard
impl Send for VrClipboard
impl !Sync for VrClipboard
impl Unpin for VrClipboard
impl UnwindSafe for VrClipboard
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().