pub struct EntityBuilder<'a> { /* private fields */ }Expand description
Builder for entity values (used in CreateEntity).
Implementations§
Source§impl<'a> EntityBuilder<'a>
impl<'a> EntityBuilder<'a>
Sourcepub fn text(
self,
property: Id,
value: impl Into<Cow<'a, str>>,
language: Option<Id>,
) -> Self
pub fn text( self, property: Id, value: impl Into<Cow<'a, str>>, language: Option<Id>, ) -> Self
Adds a TEXT value.
Sourcepub fn point(self, property: Id, lon: f64, lat: f64, alt: Option<f64>) -> Self
pub fn point(self, property: Id, lon: f64, lat: f64, alt: Option<f64>) -> Self
Adds a POINT value (longitude, latitude, optional altitude).
Sourcepub fn date(self, property: Id, days: i32, offset_min: i16) -> Self
pub fn date(self, property: Id, days: i32, offset_min: i16) -> Self
Adds a DATE value.
§Arguments
days- Signed days since Unix epoch (1970-01-01)offset_min- Signed UTC offset in minutes (e.g., +330 for +05:30)
Sourcepub fn time(self, property: Id, time_us: i64, offset_min: i16) -> Self
pub fn time(self, property: Id, time_us: i64, offset_min: i16) -> Self
Adds a TIME value.
§Arguments
time_us- Microseconds since midnight (0 to 86,399,999,999)offset_min- Signed UTC offset in minutes (e.g., +330 for +05:30)
Sourcepub fn datetime(self, property: Id, epoch_us: i64, offset_min: i16) -> Self
pub fn datetime(self, property: Id, epoch_us: i64, offset_min: i16) -> Self
Adds a DATETIME value.
§Arguments
epoch_us- Microseconds since Unix epoch (1970-01-01T00:00:00Z)offset_min- Signed UTC offset in minutes (e.g., +330 for +05:30)
Sourcepub fn schedule(self, property: Id, value: impl Into<Cow<'a, str>>) -> Self
pub fn schedule(self, property: Id, value: impl Into<Cow<'a, str>>) -> Self
Adds a SCHEDULE value (RFC 5545 iCalendar format).
Trait Implementations§
Source§impl<'a> Clone for EntityBuilder<'a>
impl<'a> Clone for EntityBuilder<'a>
Source§fn clone(&self) -> EntityBuilder<'a>
fn clone(&self) -> EntityBuilder<'a>
Returns a duplicate 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 moreSource§impl<'a> Debug for EntityBuilder<'a>
impl<'a> Debug for EntityBuilder<'a>
Source§impl<'a> Default for EntityBuilder<'a>
impl<'a> Default for EntityBuilder<'a>
Source§fn default() -> EntityBuilder<'a>
fn default() -> EntityBuilder<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for EntityBuilder<'a>
impl<'a> RefUnwindSafe for EntityBuilder<'a>
impl<'a> Send for EntityBuilder<'a>
impl<'a> Sync for EntityBuilder<'a>
impl<'a> Unpin for EntityBuilder<'a>
impl<'a> UnwindSafe for EntityBuilder<'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