Skip to main content

Subscription

Struct Subscription 

Source
pub struct Subscription {
    pub type: String,
    pub url: String,
    pub title: Option<String>,
    pub site_url: Option<String>,
    pub folder: Option<String>,
    pub fetch_hint: Option<FetchHint>,
    pub private: Option<bool>,
    pub created_at: String,
}
Expand description

community.lexicon.rss.subscription — a subscription to a syndication feed (RSS / Atom / JSON Feed). Record key: tid.

url + createdAt are required; everything else is optional.

§Public feeds only (and the reserved private marker)

atproto PDS records are public: anyone can read them via unauthenticated getRecord / listRecords and off the firehose, and they are retained even after deleteRecord. A private feed (a Substack …/feed/private/<token>, a Patreon ?auth=… feed, a Ghost members ?uuid= feed, a private-podcast token feed, or any URL that carries a secret token / key / auth credential) has its secret in the URL, so writing that URL here would leak paid / members-only access to the whole network.

Current decision: FeatherReader supports PUBLIC feeds only. A private feed is refused at the add / import boundary (see crate::feed::classify_feed_privacy) — it is never fetched, never stored, and no record (redacted or otherwise) is ever written. The server therefore holds NO private secret, which keeps “your data lives in your public PDS” 100% honest. Consequently every Subscription record actually written carries a real, public feed url, and [private] is always omitted.

The [private] field is retained ONLY as a documented, forward-compatible reserved marker for the eventual migration once atproto ships permissioned data / permission-sets (early-proposal as of mid-2026, bluesky-social/proposals#94). At that point a private feed’s secret can live in an owner-scoped, permission-gated collection and this record can reference it with private: true. Until then the field has no runtime behavior — nothing sets it and nothing branches on it.

Fields§

§type: String

The $type NSID discriminator; always nsid::SUBSCRIPTION.

§url: String

Canonical feed URL (the RSS/Atom/JSON Feed document). Required.

Always a real, PUBLIC feed URL: private/secret-bearing feeds are refused at the add boundary (see the type-level docs), so no record with a withheld or redacted url is ever written.

§title: Option<String>

Display title; a reader MAY override from feed metadata.

§site_url: Option<String>

Human-facing site the feed belongs to.

Scheme-checked on the way in. Any atproto client can write this field into the user’s repo, and the lexicon invites readers to render it as a link, so a record fetched from the PDS is attacker-controlled input. The deserialize_with below is the read-side counterpart to the write-side vet in crate::repo: together they mean a Subscription that entered this process from outside cannot be carrying a javascript: URL, whatever it is later rendered into — an href, or an OPML htmlUrl we hand back to the user as a file.

The READ side only. A record built in-process rather than deserialised does not pass through here — OPML import parses htmlUrl out of XML by hand, and the manage form assigns the field directly. Those are the write boundary’s to vet, which is why both guards exist rather than either one being sufficient.

A rejected value becomes None, so it is omitted rather than emitted empty; a consumer renders no link instead of a broken one.

Round-trip fidelity is deliberately lost. Read a record holding a hostile siteUrl, re-put it, and we write it back cleaned rather than preserving what another client stored. That heals the user’s repo instead of propagating someone else’s script URL — but it does mean a putRecord following a read is not byte-identical to what was there, and that is a decision, not an accident.

§folder: Option<String>

Optional at:// strong ref to a Folder record.

§fetch_hint: Option<FetchHint>

Optional polling-cadence hint; readers MAY honor or ignore it.

§private: Option<bool>

Reserved — no runtime behavior today.

FeatherReader currently supports public feeds only (private/secret-bearing feeds are refused at the add boundary), so nothing sets this and every written record omits it (None). It is kept as a documented, forward-compatible seam for the eventual migration once atproto ships permissioned data: at that point a private feed’s secret can live in an owner-scoped, permission-gated collection and this record can reference it with private: true. See the type-level docs.

§created_at: String

Record creation time (ISO-8601 datetime). Required.

Implementations§

Source§

impl Subscription

Source

pub fn new(url: impl Into<String>, created_at: impl Into<String>) -> Self

Construct a minimal subscription with only the required fields.

Trait Implementations§

Source§

impl Clone for Subscription

Source§

fn clone(&self) -> Subscription

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Subscription

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Subscription

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for Subscription

Source§

impl PartialEq for Subscription

Source§

fn eq(&self, other: &Subscription) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Subscription

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Subscription

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more