pub struct ListRecord<E: ListExtra> {
pub name: String,
pub owner_did: String,
pub purpose: Option<String>,
pub created_at: String,
pub extra: E,
}Expand description
An atproto list record: { name, ownerDid, purpose?, createdAt } plus
lexicon-specific extra fields E. Mirrors app.bsky.graph.list.
Fields§
§name: StringHuman-readable group name.
owner_did: StringThe DID that owns the group.
purpose: Option<String>Optional free-form description.
created_at: StringISO-8601 UTC datetime.
extra: ELexicon-specific extra fields.
Implementations§
Source§impl ListRecord<EventGroupExtra>
impl ListRecord<EventGroupExtra>
Sourcepub fn new_event_group(
name: impl Into<String>,
owner_did: impl Into<String>,
purpose: Option<String>,
keyset_id: impl Into<String>,
created_at: impl Into<String>,
) -> Result<Self>
pub fn new_event_group( name: impl Into<String>, owner_did: impl Into<String>, purpose: Option<String>, keyset_id: impl Into<String>, created_at: impl Into<String>, ) -> Result<Self>
Convenience constructor matching this lexicon’s field order (keyset_id
as a plain argument rather than wrapping it in EventGroupExtra by hand).
Source§impl<E: ListExtra> ListRecord<E>
impl<E: ListExtra> ListRecord<E>
Sourcepub fn new(
name: impl Into<String>,
owner_did: impl Into<String>,
purpose: Option<String>,
created_at: impl Into<String>,
extra: E,
) -> Result<Self>
pub fn new( name: impl Into<String>, owner_did: impl Into<String>, purpose: Option<String>, created_at: impl Into<String>, extra: E, ) -> Result<Self>
Validate and construct a record.
pub fn to_dag_cbor(&self) -> Vec<u8> ⓘ
pub fn cid(&self) -> Cid
pub fn to_value(&self) -> DagCbor
Sourcepub fn from_dag_cbor(bytes: &[u8], nsid: &str) -> Result<Self>
pub fn from_dag_cbor(bytes: &[u8], nsid: &str) -> Result<Self>
Decode canonical DAG-CBOR bytes into a record, validating all fields.
nsid attributes error messages to the calling lexicon.
pub fn from_value(value: &DagCbor, nsid: &str) -> Result<Self>
Trait Implementations§
Source§impl<E: Clone + ListExtra> Clone for ListRecord<E>
impl<E: Clone + ListExtra> Clone for ListRecord<E>
Source§fn clone(&self) -> ListRecord<E>
fn clone(&self) -> ListRecord<E>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<E: PartialEq + ListExtra> PartialEq for ListRecord<E>
impl<E: PartialEq + ListExtra> PartialEq for ListRecord<E>
Source§fn eq(&self, other: &ListRecord<E>) -> bool
fn eq(&self, other: &ListRecord<E>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<E: Eq + ListExtra> Eq for ListRecord<E>
impl<E: ListExtra> StructuralPartialEq for ListRecord<E>
Auto Trait Implementations§
impl<E> Freeze for ListRecord<E>where
E: Freeze,
impl<E> RefUnwindSafe for ListRecord<E>where
E: RefUnwindSafe,
impl<E> Send for ListRecord<E>where
E: Send,
impl<E> Sync for ListRecord<E>where
E: Sync,
impl<E> Unpin for ListRecord<E>where
E: Unpin,
impl<E> UnsafeUnpin for ListRecord<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for ListRecord<E>where
E: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more