Enum loro_internal::handler::ValueOrHandler
source · pub enum ValueOrHandler {
Value(LoroValue),
Handler(Handler),
}Variants§
Implementations§
source§impl ValueOrHandler
impl ValueOrHandler
sourcepub fn as_value_mut(&mut self) -> Option<&mut LoroValue>
pub fn as_value_mut(&mut self) -> Option<&mut LoroValue>
Optionally returns mutable references to the inner fields if this is a ValueOrHandler::Value, otherwise None
sourcepub fn as_value(&self) -> Option<&LoroValue>
pub fn as_value(&self) -> Option<&LoroValue>
Optionally returns references to the inner fields if this is a ValueOrHandler::Value, otherwise None
sourcepub fn into_value(self) -> Result<LoroValue, Self>
pub fn into_value(self) -> Result<LoroValue, Self>
Returns the inner fields if this is a ValueOrHandler::Value, otherwise returns back the enum in the Err case of the result
sourcepub fn as_handler_mut(&mut self) -> Option<&mut Handler>
pub fn as_handler_mut(&mut self) -> Option<&mut Handler>
Optionally returns mutable references to the inner fields if this is a ValueOrHandler::Handler, otherwise None
sourcepub fn as_handler(&self) -> Option<&Handler>
pub fn as_handler(&self) -> Option<&Handler>
Optionally returns references to the inner fields if this is a ValueOrHandler::Handler, otherwise None
sourcepub fn into_handler(self) -> Result<Handler, Self>
pub fn into_handler(self) -> Result<Handler, Self>
Returns the inner fields if this is a ValueOrHandler::Handler, otherwise returns back the enum in the Err case of the result
Trait Implementations§
source§impl Clone for ValueOrHandler
impl Clone for ValueOrHandler
source§fn clone(&self) -> ValueOrHandler
fn clone(&self) -> ValueOrHandler
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ValueOrHandler
impl RefUnwindSafe for ValueOrHandler
impl Send for ValueOrHandler
impl Sync for ValueOrHandler
impl Unpin for ValueOrHandler
impl UnwindSafe for ValueOrHandler
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