Enum cyfs_base::SimpleContent
source · [−]pub enum SimpleContent {
Map(MapContentT<ObjectId>),
DiffMap(MapContentT<ObjectMapDiffMapItem>),
Set(SetContentT<ObjectId>),
DiffSet(SetContentT<ObjectMapDiffSetItem>),
}
Variants
Map(MapContentT<ObjectId>)
DiffMap(MapContentT<ObjectMapDiffMapItem>)
Set(SetContentT<ObjectId>)
DiffSet(SetContentT<ObjectMapDiffSetItem>)
Implementations
sourceimpl SimpleContent
impl SimpleContent
pub fn content_type(&self) -> ObjectMapSimpleContentType
pub fn as_map(&self) -> &MapContentT<ObjectId>
pub fn as_diff_map(&self) -> &MapContentT<ObjectMapDiffMapItem>
pub fn as_set(&self) -> &SetContentT<ObjectId>
pub fn as_diff_set(&self) -> &SetContentT<ObjectMapDiffSetItem>
Trait Implementations
sourceimpl Clone for SimpleContent
impl Clone for SimpleContent
sourcefn clone(&self) -> SimpleContent
fn clone(&self) -> SimpleContent
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for SimpleContent
impl Debug for SimpleContent
sourceimpl ObjectFormat for SimpleContent
impl ObjectFormat for SimpleContent
fn format_json(&self) -> Value
sourceimpl<'__de__> RawDecode<'__de__> for SimpleContent
impl<'__de__> RawDecode<'__de__> for SimpleContent
fn raw_decode(__buf__: &'__de__ [u8]) -> BuckyResult<(Self, &'__de__ [u8])>
fn raw_decode_with_option(
buf: &'de [u8],
_opt: &RawDecodeOption
) -> BuckyResult<(Self, &'de [u8])>
sourceimpl RawEncode for SimpleContent
impl RawEncode for SimpleContent
fn raw_encode<'__de__>(
&self,
__buf__: &'__de__ mut [u8],
__purpose__: &Option<RawEncodePurpose>
) -> BuckyResult<&'__de__ mut [u8]>
fn raw_measure(
&self,
__purpose__: &Option<RawEncodePurpose>
) -> BuckyResult<usize>
fn raw_tail_encode<'a>(
&self,
buf: &'a mut [u8],
purpose: &Option<RawEncodePurpose>
) -> BuckyResult<&'a [u8]>
fn raw_encode_to_buffer(&self) -> BuckyResult<Vec<u8>>
fn raw_hash_value(&self) -> BuckyResult<HashValue>
fn hash_buf(&self, encoded_buf: &[u8]) -> HashValue
fn raw_hash_encode(&self) -> BuckyResult<Vec<u8>>
Auto Trait Implementations
impl RefUnwindSafe for SimpleContent
impl Send for SimpleContent
impl Sync for SimpleContent
impl Unpin for SimpleContent
impl UnwindSafe for SimpleContent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more