[][src]Struct places::bookmark_sync::record::BookmarkRecordId

pub struct BookmarkRecordId(SyncGuid);

A bookmark record ID. Bookmark record IDs are the same as Places GUIDs, except for:

  1. The Places root, which is "places". Note that the Places root is not synced, but is still referenced in the user content roots' parentids.
  2. 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

impl BookmarkRecordId[src]

pub fn from_payload_id(payload_id: SyncGuid) -> BookmarkRecordId[src]

Creates a bookmark record ID from a Sync record payload ID.

pub fn as_payload_id(&self) -> &str[src]

Returns a reference to the record payload ID. This is the borrowed version of into_payload_id, and used for serialization.

pub fn into_payload_id(self) -> String[src]

Returns the record payload ID. This is the owned version of as_payload_id, and exists to avoid copying strings when uploading tombstones.

pub fn as_guid(&self) -> &SyncGuid[src]

Returns a reference to the GUID for this record ID.

fn root_payload_id(&self) -> Option<&str>[src]

Trait Implementations

impl Clone for BookmarkRecordId[src]

impl Debug for BookmarkRecordId[src]

impl<'de> Deserialize<'de> for BookmarkRecordId[src]

impl From<BookmarkRecordId> for SyncGuid[src]

Converts a bookmark record ID into a Places GUID.

impl From<Guid> for BookmarkRecordId[src]

Converts a Places GUID into a bookmark record ID.

impl Hash for BookmarkRecordId[src]

impl PartialEq<BookmarkRecordId> for BookmarkRecordId[src]

impl Serialize for BookmarkRecordId[src]

impl StructuralPartialEq for BookmarkRecordId[src]

Auto Trait Implementations

impl RefUnwindSafe for BookmarkRecordId

impl Send for BookmarkRecordId

impl Sync for BookmarkRecordId

impl Unpin for BookmarkRecordId

impl UnwindSafe for BookmarkRecordId

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CallHasher for T where
    T: Hash

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,