pub struct BookmarkUpdateInfo {
pub guid: Guid,
pub title: Option<String>,
pub url: Option<String>,
pub parent_guid: Option<Guid>,
pub position: Option<u32>,
}
Expand description
We don’t require bookmark type for updates on the other side of the FFI, since the type is immutable, and iOS wants to be able to move bookmarks by GUID. We also don’t/can’t enforce as much in the Kotlin/Swift type system as we can/do in Rust.
This is a type that represents the data we get from the FFI, which we then
turn into a UpdatableItem
that we can actually use (we do this by
reading the type out of the DB, but we can do that transactionally, so it’s
not a problem).
It’s basically an intermediate between the protobuf message format and
UpdatableItem
, used to avoid needing to pass in the type
to update, and
to give us a place to check things that we can’t enforce in Swift/Kotlin’s
type system, but that we do in Rust’s.
Fields§
§guid: Guid
§title: Option<String>
§url: Option<String>
§parent_guid: Option<Guid>
§position: Option<u32>
Implementations§
source§impl BookmarkUpdateInfo
impl BookmarkUpdateInfo
sourcepub fn into_updatable(
self,
ty: BookmarkType,
) -> Result<(SyncGuid, UpdatableItem)>
pub fn into_updatable( self, ty: BookmarkType, ) -> Result<(SyncGuid, UpdatableItem)>
The functions exposed over the FFI use the same type for all inserts. This function converts that into the type our update API uses.
Trait Implementations§
source§impl Clone for BookmarkUpdateInfo
impl Clone for BookmarkUpdateInfo
source§fn clone(&self) -> BookmarkUpdateInfo
fn clone(&self) -> BookmarkUpdateInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BookmarkUpdateInfo
impl Debug for BookmarkUpdateInfo
source§impl PartialEq for BookmarkUpdateInfo
impl PartialEq for BookmarkUpdateInfo
impl Eq for BookmarkUpdateInfo
impl StructuralPartialEq for BookmarkUpdateInfo
Auto Trait Implementations§
impl Freeze for BookmarkUpdateInfo
impl RefUnwindSafe for BookmarkUpdateInfo
impl Send for BookmarkUpdateInfo
impl Sync for BookmarkUpdateInfo
impl Unpin for BookmarkUpdateInfo
impl UnwindSafe for BookmarkUpdateInfo
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
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)
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
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
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
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Read more