pub struct BlobTicket { /* private fields */ }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) -> Self
 
pub fn new(node: NodeAddr, hash: Hash, format: BlobFormat) -> Self
Creates a new ticket.
Sourcepub fn format(&self) -> BlobFormat
 
pub fn format(&self) -> BlobFormat
The BlobFormat for this ticket.
pub fn hash_and_format(&self) -> HashAndFormat
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 From<BlobTicket> for HashAndFormat
 
impl From<BlobTicket> for HashAndFormat
Source§fn from(val: BlobTicket) -> Self
 
fn from(val: BlobTicket) -> Self
Converts to this type from the input type.
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
Source§fn from_bytes(bytes: &[u8]) -> Result<Self, ParseError>
 
fn from_bytes(bytes: &[u8]) -> Result<Self, ParseError>
Deserialize from the base32 string representation bytes.
§fn deserialize(str: &str) -> Result<Self, ParseError>
 
fn deserialize(str: &str) -> Result<Self, ParseError>
Deserialize from a string.
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,
§impl<T> CompatExt for T
 
impl<T> CompatExt for T
§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
 
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
    T: ?Sized,
 
impl<T> PolicyExt for Twhere
    T: ?Sized,
§impl<T> ToStringFallible for Twhere
    T: Display,
 
impl<T> ToStringFallible for Twhere
    T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
 
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.