pub struct RecentLocation(/* private fields */);Expand description
One remembered journal, as an opaque token.
On the desktop the token is a canonical absolute path
(from_path / to_path); on iOS it is
the id of a security-scoped bookmark the host stores and resolves. The store
never interprets it beyond equality. Serialized as a bare JSON string, which
is what keeps the file format identical to the path-only one before it.
Implementations§
Source§impl RecentLocation
impl RecentLocation
Sourcepub fn from_path(path: &Path) -> Option<Self>
pub fn from_path(path: &Path) -> Option<Self>
The desktop token for path: canonicalized to an absolute path for a
stable dedup key, falling back to a plain absolute path (then the input)
if the file cannot be resolved.
None for a path that is not valid UTF-8, which a JSON string cannot
hold. (Before tokens such a path made the whole store fail to
serialize; now it is simply not remembered.)
Trait Implementations§
Source§impl Clone for RecentLocation
impl Clone for RecentLocation
Source§impl Debug for RecentLocation
impl Debug for RecentLocation
Source§impl<'de> Deserialize<'de> for RecentLocation
impl<'de> Deserialize<'de> for RecentLocation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RecentLocation
Source§impl Hash for RecentLocation
impl Hash for RecentLocation
Source§impl PartialEq for RecentLocation
impl PartialEq for RecentLocation
Source§impl Serialize for RecentLocation
impl Serialize for RecentLocation
impl StructuralPartialEq for RecentLocation
Auto Trait Implementations§
impl Forget for RecentLocation
impl Freeze for RecentLocation
impl Move for RecentLocation
impl RefUnwindSafe for RecentLocation
impl Send for RecentLocationwhere
RawVecInner: Send,
impl Sync for RecentLocationwhere
RawVecInner: Sync,
impl Unpin for RecentLocation
impl UnsafeUnpin for RecentLocation
impl UnwindSafe for RecentLocationwhere
RawVecInner: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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