Struct NativeProfile
pub struct NativeProfile { /* private fields */ }Expand description
One app’s launcher-owned profile in one room, opened by the trusted
host from outside the app’s sandbox: the same store, device identity and
storage workspace NativeProcessHost resolves inside it. The shell
uses it to carry a window’s record and presentation to another room
(crate::record::transfer); it grants nothing the app itself lacks.
Implementations§
§impl NativeProfile
impl NativeProfile
pub fn open(
profile_root: &Path,
room: Option<&str>,
) -> Result<NativeProfile, LaunchError>
pub fn open( profile_root: &Path, room: Option<&str>, ) -> Result<NativeProfile, LaunchError>
profile_root is the directory the launcher points the app’s
XDG_DATA_HOME at; room is its launcher workspace id.
§Errors
A relative root, a malformed room or corrupt device identity.
pub fn store(&self) -> &Rc<dyn DurableStore>
pub fn device_id(&self) -> &str
pub fn workspace_id(&self) -> &str
pub fn workspace_id(&self) -> &str
The storage workspace the app’s records are scoped to.
pub fn saved_view(
&self,
instance: u64,
) -> Result<Option<SavedInstanceView>, LaunchError>
pub fn saved_view( &self, instance: u64, ) -> Result<Option<SavedInstanceView>, LaunchError>
The presentation one instance last saved here, naming the record it shows.
§Errors
Unreadable, malformed or foreign presentation.
pub fn adopt_view(
&self,
view: &SavedInstanceView,
instance: u64,
record: &RecordCheckout,
) -> Result<(), LaunchError>
pub fn adopt_view( &self, view: &SavedInstanceView, instance: u64, record: &RecordCheckout, ) -> Result<(), LaunchError>
Give instance in this profile the presentation view had elsewhere,
now showing record: what a window carried into this room reopens to.
§Errors
An invalid record identity or a store that refused the write.
Auto Trait Implementations§
impl Freeze for NativeProfile
impl !RefUnwindSafe for NativeProfile
impl !Send for NativeProfile
impl !Sync for NativeProfile
impl Unpin for NativeProfile
impl UnsafeUnpin for NativeProfile
impl !UnwindSafe for NativeProfile
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§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>
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>
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