Struct etebase::Collection
source · pub struct Collection { /* private fields */ }
Expand description
Implementations§
source§impl Collection
impl Collection
sourcepub fn verify(&self) -> Result<bool>
pub fn verify(&self) -> Result<bool>
Manually verify the integrity of the collection
This is also done automatically by the API
sourcepub fn set_meta<T: MsgPackSerilization>(&mut self, meta: &T) -> Result<()>
pub fn set_meta<T: MsgPackSerilization>(&mut self, meta: &T) -> Result<()>
Set metadata for the collection object
Arguments:
meta
- theItemMetadata
object to be set for the collection
sourcepub fn meta(&self) -> Result<ItemMetadata>
pub fn meta(&self) -> Result<ItemMetadata>
Return the ItemMetadata
of the collection
sourcepub fn meta_generic<T: MsgPackSerilization>(&self) -> Result<T::Output>
pub fn meta_generic<T: MsgPackSerilization>(&self) -> Result<T::Output>
Return the ItemMetadata
of the collection deserializing using a generic metadata object
The metadata object needs to implement the MsgPackSerilization
trait.
sourcepub fn set_meta_raw(&mut self, meta: &[u8]) -> Result<()>
pub fn set_meta_raw(&mut self, meta: &[u8]) -> Result<()>
Set metadata for the collection object from a byte array
Arguments:
meta
- the metadata for the collection. This needs to be a validItemMetadata
struct encoded usingmsgpack
.
sourcepub fn meta_raw(&self) -> Result<Vec<u8>>
pub fn meta_raw(&self) -> Result<Vec<u8>>
Return metadata for the collection object as a byte array
sourcepub fn set_content(&mut self, content: &[u8]) -> Result<()>
pub fn set_content(&mut self, content: &[u8]) -> Result<()>
Set the content of the collection
Arguments:
content
- the content of the collection as a byte array
sourcepub fn delete(&mut self) -> Result<()>
pub fn delete(&mut self) -> Result<()>
Mark the collection as deleted
The collection needs to be uploaded for this to take effect
sourcepub fn is_deleted(&self) -> bool
pub fn is_deleted(&self) -> bool
Check whether the collection is marked as deleted
sourcepub fn stoken(&self) -> Option<&str>
pub fn stoken(&self) -> Option<&str>
The sync token for the collection
The sync token reflects changes to the collection properties or its Item
s on the server
sourcepub fn access_level(&self) -> CollectionAccessLevel
pub fn access_level(&self) -> CollectionAccessLevel
Return the access level of the collection for the current user
sourcepub fn collection_type(&self) -> Result<String>
pub fn collection_type(&self) -> Result<String>
The type of the collection
Trait Implementations§
source§impl Clone for Collection
impl Clone for Collection
source§fn clone(&self) -> Collection
fn clone(&self) -> Collection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more