#[repr(C)]pub struct TCAnnotation {
pub entry: time_t,
pub description: TCString,
}
Expand description
***** TCAnnotation *****
TCAnnotation contains the details of an annotation.
§Safety
An annotation must be initialized from a tc_.. function, and later freed
with tc_annotation_free
or tc_annotation_list_free
.
Any function taking a *TCAnnotation
requires:
- the pointer must not be NUL;
- the pointer must be one previously returned from a tc_… function;
- the memory referenced by the pointer must never be modified by C code; and
- ownership transfers to the called function, and the value must not be used after the call returns. In fact, the value will be zeroed out to ensure this.
TCAnnotations are not threadsafe.
typedef struct TCAnnotation {
// Time the annotation was made. Must be nonzero.
time_t entry;
// Content of the annotation. Must not be NULL.
TCString description;
} TCAnnotation;
Fields§
§entry: time_t
§description: TCString
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TCAnnotation
impl RefUnwindSafe for TCAnnotation
impl !Send for TCAnnotation
impl !Sync for TCAnnotation
impl Unpin for TCAnnotation
impl UnwindSafe for TCAnnotation
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more