pub enum AttrVal {
TimelineId(Box<TimelineId>),
EventCoordinate(Box<EventCoordinate>),
String(Cow<'static, str>),
Integer(i64),
BigInt(BigInt),
Float(OrderedFloat<f64>),
Bool(bool),
Timestamp(Nanoseconds),
LogicalTime(LogicalTime),
}
Variants§
TimelineId(Box<TimelineId>)
EventCoordinate(Box<EventCoordinate>)
String(Cow<'static, str>)
Integer(i64)
BigInt(BigInt)
Float(OrderedFloat<f64>)
Bool(bool)
Timestamp(Nanoseconds)
LogicalTime(LogicalTime)
Implementations§
Source§impl AttrVal
impl AttrVal
pub fn attr_type(&self) -> AttrType
pub fn as_timeline_id(self) -> Result<TimelineId, WrongAttrTypeError>
pub fn as_event_coordinate(self) -> Result<EventCoordinate, WrongAttrTypeError>
pub fn as_string(self) -> Result<Cow<'static, str>, WrongAttrTypeError>
pub fn as_int(self) -> Result<i64, WrongAttrTypeError>
pub fn as_bigint(self) -> Result<i128, WrongAttrTypeError>
pub fn as_float(self) -> Result<f64, WrongAttrTypeError>
pub fn as_bool(self) -> Result<bool, WrongAttrTypeError>
pub fn as_timestamp(self) -> Result<Nanoseconds, WrongAttrTypeError>
pub fn as_logical_time(self) -> Result<LogicalTime, WrongAttrTypeError>
Trait Implementations§
Source§impl From<EventCoordinate> for AttrVal
impl From<EventCoordinate> for AttrVal
Source§fn from(coord: EventCoordinate) -> AttrVal
fn from(coord: EventCoordinate) -> AttrVal
Converts to this type from the input type.
Source§impl From<LogicalTime> for AttrVal
impl From<LogicalTime> for AttrVal
Source§fn from(lt: LogicalTime) -> AttrVal
fn from(lt: LogicalTime) -> AttrVal
Converts to this type from the input type.
Source§impl From<Nanoseconds> for AttrVal
impl From<Nanoseconds> for AttrVal
Source§fn from(ns: Nanoseconds) -> AttrVal
fn from(ns: Nanoseconds) -> AttrVal
Converts to this type from the input type.
Source§impl From<TimelineId> for AttrVal
impl From<TimelineId> for AttrVal
Source§fn from(timeline_id: TimelineId) -> AttrVal
fn from(timeline_id: TimelineId) -> AttrVal
Converts to this type from the input type.
Source§impl Ord for AttrVal
impl Ord for AttrVal
Source§impl PartialOrd for AttrVal
impl PartialOrd for AttrVal
Source§impl TryFrom<AttrVal> for EventCoordinate
impl TryFrom<AttrVal> for EventCoordinate
Source§type Error = WrongAttrTypeError
type Error = WrongAttrTypeError
The type returned in the event of a conversion error.
Source§fn try_from(
value: AttrVal,
) -> Result<EventCoordinate, <EventCoordinate as TryFrom<AttrVal>>::Error>
fn try_from( value: AttrVal, ) -> Result<EventCoordinate, <EventCoordinate as TryFrom<AttrVal>>::Error>
Performs the conversion.
Source§impl TryFrom<AttrVal> for LogicalTime
impl TryFrom<AttrVal> for LogicalTime
Source§type Error = WrongAttrTypeError
type Error = WrongAttrTypeError
The type returned in the event of a conversion error.
Source§fn try_from(
value: AttrVal,
) -> Result<LogicalTime, <LogicalTime as TryFrom<AttrVal>>::Error>
fn try_from( value: AttrVal, ) -> Result<LogicalTime, <LogicalTime as TryFrom<AttrVal>>::Error>
Performs the conversion.
Source§impl TryFrom<AttrVal> for Nanoseconds
impl TryFrom<AttrVal> for Nanoseconds
Source§type Error = WrongAttrTypeError
type Error = WrongAttrTypeError
The type returned in the event of a conversion error.
Source§fn try_from(
value: AttrVal,
) -> Result<Nanoseconds, <Nanoseconds as TryFrom<AttrVal>>::Error>
fn try_from( value: AttrVal, ) -> Result<Nanoseconds, <Nanoseconds as TryFrom<AttrVal>>::Error>
Performs the conversion.
Source§impl TryFrom<AttrVal> for TimelineId
impl TryFrom<AttrVal> for TimelineId
Source§type Error = WrongAttrTypeError
type Error = WrongAttrTypeError
The type returned in the event of a conversion error.
Source§fn try_from(
value: AttrVal,
) -> Result<TimelineId, <TimelineId as TryFrom<AttrVal>>::Error>
fn try_from( value: AttrVal, ) -> Result<TimelineId, <TimelineId as TryFrom<AttrVal>>::Error>
Performs the conversion.
impl Eq for AttrVal
impl StructuralPartialEq for AttrVal
Auto Trait Implementations§
impl Freeze for AttrVal
impl RefUnwindSafe for AttrVal
impl Send for AttrVal
impl Sync for AttrVal
impl Unpin for AttrVal
impl UnwindSafe for AttrVal
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