pub struct BlobTicket { /* private fields */ }
Available on crate features
key
and base32
only.Expand description
A token containing everything to get a file from the provider.
It is a single item which can be easily serialized and deserialized.
Implementations§
Source§impl BlobTicket
impl BlobTicket
Sourcepub fn new(node: NodeAddr, hash: Hash, format: BlobFormat) -> Result<Self>
pub fn new(node: NodeAddr, hash: Hash, format: BlobFormat) -> Result<Self>
Creates a new ticket.
Sourcepub fn format(&self) -> BlobFormat
pub fn format(&self) -> BlobFormat
The BlobFormat
for this ticket.
Sourcepub fn recursive(&self) -> bool
pub fn recursive(&self) -> bool
True if the ticket is for a collection and should retrieve all blobs in it.
Sourcepub fn into_parts(self) -> (NodeAddr, Hash, BlobFormat)
pub fn into_parts(self) -> (NodeAddr, Hash, BlobFormat)
Get the contents of the ticket, consuming it.
Trait Implementations§
Source§impl Clone for BlobTicket
impl Clone for BlobTicket
Source§fn clone(&self) -> BlobTicket
fn clone(&self) -> BlobTicket
Returns a copy of the value. Read more
1.0.0 · 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 BlobTicket
impl Debug for BlobTicket
Source§impl<'de> Deserialize<'de> for BlobTicket
impl<'de> Deserialize<'de> for BlobTicket
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for BlobTicket
impl Display for BlobTicket
Source§impl FromStr for BlobTicket
impl FromStr for BlobTicket
Source§impl PartialEq for BlobTicket
impl PartialEq for BlobTicket
Source§impl Serialize for BlobTicket
impl Serialize for BlobTicket
Source§impl Ticket for BlobTicket
impl Ticket for BlobTicket
impl Eq for BlobTicket
impl StructuralPartialEq for BlobTicket
Auto Trait Implementations§
impl Freeze for BlobTicket
impl RefUnwindSafe for BlobTicket
impl Send for BlobTicket
impl Sync for BlobTicket
impl Unpin for BlobTicket
impl UnwindSafe for BlobTicket
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)