Enum loro_internal::op::RawOpContent
source · pub enum RawOpContent<'a> {
Map(MapSet),
List(ListOp<'a>),
Tree(TreeOp),
}Variants§
Implementations§
source§impl<'a> RawOpContent<'a>
impl<'a> RawOpContent<'a>
sourcepub fn as_map_mut(&mut self) -> Option<&mut MapSet>
pub fn as_map_mut(&mut self) -> Option<&mut MapSet>
Optionally returns mutable references to the inner fields if this is a RawOpContent::Map, otherwise None
sourcepub fn as_map(&self) -> Option<&MapSet>
pub fn as_map(&self) -> Option<&MapSet>
Optionally returns references to the inner fields if this is a RawOpContent::Map, otherwise None
sourcepub fn into_map(self) -> Result<MapSet, Self>
pub fn into_map(self) -> Result<MapSet, Self>
Returns the inner fields if this is a RawOpContent::Map, otherwise returns back the enum in the Err case of the result
sourcepub fn as_list_mut(&mut self) -> Option<&mut ListOp<'a>>
pub fn as_list_mut(&mut self) -> Option<&mut ListOp<'a>>
Optionally returns mutable references to the inner fields if this is a RawOpContent::List, otherwise None
sourcepub fn as_list(&self) -> Option<&ListOp<'a>>
pub fn as_list(&self) -> Option<&ListOp<'a>>
Optionally returns references to the inner fields if this is a RawOpContent::List, otherwise None
sourcepub fn into_list(self) -> Result<ListOp<'a>, Self>
pub fn into_list(self) -> Result<ListOp<'a>, Self>
Returns the inner fields if this is a RawOpContent::List, otherwise returns back the enum in the Err case of the result
sourcepub fn as_tree_mut(&mut self) -> Option<&mut TreeOp>
pub fn as_tree_mut(&mut self) -> Option<&mut TreeOp>
Optionally returns mutable references to the inner fields if this is a RawOpContent::Tree, otherwise None
source§impl<'a> RawOpContent<'a>
impl<'a> RawOpContent<'a>
pub fn to_static(&self) -> RawOpContent<'static>
Trait Implementations§
source§impl<'a> Clone for RawOpContent<'a>
impl<'a> Clone for RawOpContent<'a>
source§impl<'a> Debug for RawOpContent<'a>
impl<'a> Debug for RawOpContent<'a>
source§impl<'de, 'a> Deserialize<'de> for RawOpContent<'a>
impl<'de, 'a> Deserialize<'de> for RawOpContent<'a>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> HasLength for RawOpContent<'a>
impl<'a> HasLength for RawOpContent<'a>
source§fn content_len(&self) -> usize
fn content_len(&self) -> usize
It is the length of the content, i.e. the length when no Mergable::merge ever happen. Read more
source§impl<'a> Mergable for RawOpContent<'a>
impl<'a> Mergable for RawOpContent<'a>
source§impl<'a> PartialEq for RawOpContent<'a>
impl<'a> PartialEq for RawOpContent<'a>
source§fn eq(&self, other: &RawOpContent<'a>) -> bool
fn eq(&self, other: &RawOpContent<'a>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'a> Serialize for RawOpContent<'a>
impl<'a> Serialize for RawOpContent<'a>
source§impl<'a> Sliceable for RawOpContent<'a>
impl<'a> Sliceable for RawOpContent<'a>
impl<'a> StructuralPartialEq for RawOpContent<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for RawOpContent<'a>
impl<'a> Send for RawOpContent<'a>
impl<'a> Sync for RawOpContent<'a>
impl<'a> Unpin for RawOpContent<'a>
impl<'a> UnwindSafe for RawOpContent<'a>
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