pub struct ObjectLinkV0 {
pub repo: Option<RepoId>,
pub topic: Option<TopicId>,
pub objects: Vec<ObjectRef>,
pub overlay: OverlayLink,
pub peers: Vec<PeerAdvert>,
}
Expand description
Obtains one or more objects of a repo (Commit, File) by their ID.
On an outerOverlay, the header is always emptied (no way to reconstruct the DAG of commits) except on public overlays or if a topicId is provided If the intent is to share a whole DAG of commits at a definite CommitID/HEAD, then ReadBranchLink should be used instead (or PublicRepoLink if public site)
Fields§
§repo: Option<RepoId>
Repository ID: not used to make the request. but useful for commits, to know which repo they are from without needing to fetch and open the full DAG of commits. (but the one here might be wrong. only when opening the DAG can the real repo be known. also note that on outerOverlay of non public stores, the DAG is not accessible) note that it could be omitted, specially if the objects are files. As files are content-addressable and belong to an overlay but not to a specific repo or topic.
topic: Option<TopicId>
An optional topic that will be used to retrieve the Certificate of a commit, if needed (topic has to be checked with the one inside the commit. the one here might be wrong. it is provided here as an optimization) or can be used to help with BlockSearchTopic. If the topic is provided, a TopicSyncReq can be performed, and the causal past of the commit will appear (by repeated tries while narrowing down on the ancestors), hence defeating the “emptied header” protection
objects: Vec<ObjectRef>
§overlay: OverlayLink
Overlay to join
peers: Vec<PeerAdvert>
Peer brokers to connect to
Trait Implementations§
Source§impl Clone for ObjectLinkV0
impl Clone for ObjectLinkV0
Source§fn clone(&self) -> ObjectLinkV0
fn clone(&self) -> ObjectLinkV0
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ObjectLinkV0
impl Debug for ObjectLinkV0
Source§impl<'de> Deserialize<'de> for ObjectLinkV0
impl<'de> Deserialize<'de> for ObjectLinkV0
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ObjectLinkV0
impl RefUnwindSafe for ObjectLinkV0
impl Send for ObjectLinkV0
impl Sync for ObjectLinkV0
impl Unpin for ObjectLinkV0
impl UnwindSafe for ObjectLinkV0
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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