pub struct VettedSubscription(/* private fields */);Expand description
A Subscription whose siteUrl has been scheme-checked.
#[serde(transparent)] so the bytes on the wire are byte-identical to
serializing the inner record. This type changes what the compiler permits,
not what the PDS receives — a record-shape change here would be a silent
migration of every reader’s repo.
Implementations§
Source§impl VettedSubscription
impl VettedSubscription
Sourcepub fn new(sub: &Subscription) -> Self
pub fn new(sub: &Subscription) -> Self
Scheme-check siteUrl and hand back a record the writers will accept.
A rejected URL becomes None rather than dropping the subscription: the
feed is what the reader asked for, the site link is decoration. That is
the same call the previous free-function vet made, and the reasoning is
unchanged — what changes is that skipping it no longer type-checks.
Sourcepub fn all(subs: &[Subscription]) -> Vec<Self>
pub fn all(subs: &[Subscription]) -> Vec<Self>
Vet a batch — the OPML-import path.
Trait Implementations§
Source§impl Clone for VettedSubscription
impl Clone for VettedSubscription
Source§fn clone(&self) -> VettedSubscription
fn clone(&self) -> VettedSubscription
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 Debug for VettedSubscription
impl Debug for VettedSubscription
Source§impl Serialize for VettedSubscription
impl Serialize for VettedSubscription
impl WritableRecord for VettedSubscription
Auto Trait Implementations§
impl Freeze for VettedSubscription
impl RefUnwindSafe for VettedSubscription
impl Send for VettedSubscription
impl Sync for VettedSubscription
impl Unpin for VettedSubscription
impl UnsafeUnpin for VettedSubscription
impl UnwindSafe for VettedSubscription
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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