pub struct BundleList {
pub mode: BundleListMode,
pub bundles: Vec<BundleListEntry>,
}Expand description
A bundle list as the bundle-uri command returns it.
Fields§
§mode: BundleListModebundle.mode.
bundles: Vec<BundleListEntry>The bundles, in the order the server listed them.
Implementations§
Source§impl BundleList
impl BundleList
Sourcepub fn parse<'a>(lines: impl IntoIterator<Item = &'a str>) -> Result<Self>
pub fn parse<'a>(lines: impl IntoIterator<Item = &'a str>) -> Result<Self>
Parse key=value lines. Unknown keys are ignored; bundles without a
uri are dropped.
§Errors
Error::Message when bundle.version is present and is not 1.
Sourcepub fn to_lines(&self) -> Vec<String>
pub fn to_lines(&self) -> Vec<String>
The key=value lines of this list, ready to send as pkt-lines.
Sourcepub fn clone_bundle(&self) -> Option<&BundleListEntry>
pub fn clone_bundle(&self) -> Option<&BundleListEntry>
The bundle a fresh clone should start from: the newest by creation token, else the first listed.
Trait Implementations§
Source§impl Clone for BundleList
impl Clone for BundleList
Source§impl Debug for BundleList
impl Debug for BundleList
Source§impl Default for BundleList
impl Default for BundleList
impl Eq for BundleList
Source§impl PartialEq for BundleList
impl PartialEq for BundleList
impl StructuralPartialEq for BundleList
Auto Trait Implementations§
impl Freeze for BundleList
impl RefUnwindSafe for BundleList
impl Send for BundleList
impl Sync for BundleList
impl Unpin for BundleList
impl UnsafeUnpin for BundleList
impl UnwindSafe for BundleList
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.