Struct arrow_flight::FlightEndpoint
source · pub struct FlightEndpoint {
pub ticket: Option<Ticket>,
pub location: Vec<Location>,
}Expand description
A particular stream or split associated with a flight.
Fields§
§ticket: Option<Ticket>Token used to retrieve this stream.
location: Vec<Location>A list of URIs where this ticket can be redeemed via DoGet().
If the list is empty, the expectation is that the ticket can only be redeemed on the current service where the ticket was generated.
If the list is not empty, the expectation is that the ticket can be redeemed at any of the locations, and that the data returned will be equivalent. In this case, the ticket may only be redeemed at one of the given locations, and not (necessarily) on the current service.
In other words, an application can use multiple locations to represent redundant and/or load balanced services.
Implementations§
source§impl FlightEndpoint
impl FlightEndpoint
sourcepub fn new() -> FlightEndpoint
pub fn new() -> FlightEndpoint
Create a new, empty FlightEndpoint that represents a location
to retrieve Flight results.
Example
// Specify the client should fetch results from this server
let endpoint = FlightEndpoint::new()
.with_ticket(Ticket::new("the ticket"));
// Specify the client should fetch results from either
// `http://example.com` or `https://example.com`
let endpoint = FlightEndpoint::new()
.with_ticket(Ticket::new("the ticket"))
.with_location("http://example.com")
.with_location("https://example.com");sourcepub fn with_ticket(self, ticket: Ticket) -> Self
pub fn with_ticket(self, ticket: Ticket) -> Self
Set the Ticket used to retrieve data from the endpoint
sourcepub fn with_location(self, uri: impl Into<String>) -> Self
pub fn with_location(self, uri: impl Into<String>) -> Self
Add a location uri to this endpoint. Note each endpoint can
have multiple locations.
If no uri is specified, the Flight Spec says:
* If the list is empty, the expectation is that the ticket can only
* be redeemed on the current service where the ticket was
* generated.
Trait Implementations§
source§impl Clone for FlightEndpoint
impl Clone for FlightEndpoint
source§fn clone(&self) -> FlightEndpoint
fn clone(&self) -> FlightEndpoint
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for FlightEndpoint
impl Debug for FlightEndpoint
source§impl Default for FlightEndpoint
impl Default for FlightEndpoint
source§impl Display for FlightEndpoint
impl Display for FlightEndpoint
source§impl Message for FlightEndpoint
impl Message for FlightEndpoint
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8, Global>where Self: Sized,
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where Self: Sized,
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
self. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
self.source§impl PartialEq<FlightEndpoint> for FlightEndpoint
impl PartialEq<FlightEndpoint> for FlightEndpoint
source§fn eq(&self, other: &FlightEndpoint) -> bool
fn eq(&self, other: &FlightEndpoint) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for FlightEndpoint
Auto Trait Implementations§
impl RefUnwindSafe for FlightEndpoint
impl Send for FlightEndpoint
impl Sync for FlightEndpoint
impl Unpin for FlightEndpoint
impl UnwindSafe for FlightEndpoint
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request