pub struct BookmarkRecordId(/* private fields */);
Expand description
A bookmark record ID. Bookmark record IDs are the same as Places GUIDs, except for:
- The Places root, which is “places”. Note that the Places root is not
synced, but is still referenced in the user content roots’
parentid
s. - The four user content roots, which omit trailing underscores.
This wrapper helps avoid mix-ups like storing a record ID instead of a GUID, or uploading a GUID instead of a record ID.
Internally, we convert record IDs to GUIDs when applying incoming records, and only convert back to GUIDs during upload.
Implementations§
source§impl BookmarkRecordId
impl BookmarkRecordId
sourcepub fn from_payload_id(payload_id: SyncGuid) -> BookmarkRecordId
pub fn from_payload_id(payload_id: SyncGuid) -> BookmarkRecordId
Creates a bookmark record ID from a Sync record payload ID.
sourcepub fn as_payload_id(&self) -> &str
pub fn as_payload_id(&self) -> &str
Returns a reference to the record payload ID. This is the borrowed
version of into_payload_id
, and used for serialization.
sourcepub fn into_payload_id(self) -> SyncGuid
pub fn into_payload_id(self) -> SyncGuid
Returns the record payload ID. This is the owned version of
as_payload_id
, and exists to avoid copying strings when uploading
tombstones.
Trait Implementations§
source§impl Clone for BookmarkRecordId
impl Clone for BookmarkRecordId
source§fn clone(&self) -> BookmarkRecordId
fn clone(&self) -> BookmarkRecordId
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BookmarkRecordId
impl Debug for BookmarkRecordId
source§impl<'de> Deserialize<'de> for BookmarkRecordId
impl<'de> Deserialize<'de> for BookmarkRecordId
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl From<BookmarkRecordId> for Guid
impl From<BookmarkRecordId> for Guid
Converts a bookmark record ID into a Places GUID.
source§fn from(record_id: BookmarkRecordId) -> SyncGuid
fn from(record_id: BookmarkRecordId) -> SyncGuid
Converts to this type from the input type.
source§impl From<Guid> for BookmarkRecordId
impl From<Guid> for BookmarkRecordId
Converts a Places GUID into a bookmark record ID.
source§fn from(guid: SyncGuid) -> BookmarkRecordId
fn from(guid: SyncGuid) -> BookmarkRecordId
Converts to this type from the input type.
source§impl Hash for BookmarkRecordId
impl Hash for BookmarkRecordId
source§impl PartialEq for BookmarkRecordId
impl PartialEq for BookmarkRecordId
source§impl Serialize for BookmarkRecordId
impl Serialize for BookmarkRecordId
impl Eq for BookmarkRecordId
impl StructuralPartialEq for BookmarkRecordId
Auto Trait Implementations§
impl Freeze for BookmarkRecordId
impl RefUnwindSafe for BookmarkRecordId
impl Send for BookmarkRecordId
impl Sync for BookmarkRecordId
impl Unpin for BookmarkRecordId
impl UnwindSafe for BookmarkRecordId
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
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<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read more