PushEvent
struct PushEvent
Push event
Fields
Event detail
Event detail
Event detail
Methods
[src]
fn new(inner: _PushEvent): PushEvent {
switch (inner.detail) {
case 0:
let detail_inner = inner.quote!;
return PushEvent {
inner,
symbol: inner.symbol,
detail: PushQuote.new(detail_inner),
};
case 1:
let detail_inner = inner.depth!;
return PushEvent {
inner,
symbol: inner.symbol,
detail: PushDepth.new(detail_inner),
};
case 2:
let detail_inner = inner.brokers!;
return PushEvent {
inner,
symbol: inner.symbol,
detail: PushBrokers.new(detail_inner),
};
case 3:
let detail_inner = inner.trade!;
return PushEvent {
inner,
symbol: inner.symbol,
detail: PushTrades.new(detail_inner),
};
default:
let detail_inner = inner.candlestick!;
return PushEvent {
inner,
symbol: inner.symbol,
detail: PushCandlestick.new(detail_inner),
};
}
}
[src]
fn new(inner: _PushEvent): PushEvent {
switch (inner.detail) {
case 0:
let detail_inner = inner.quote!;
return PushEvent {
inner,
symbol: inner.symbol,
detail: PushQuote.new(detail_inner),
};
case 1:
let detail_inner = inner.depth!;
return PushEvent {
inner,
symbol: inner.symbol,
detail: PushDepth.new(detail_inner),
};
case 2:
let detail_inner = inner.brokers!;
return PushEvent {
inner,
symbol: inner.symbol,
detail: PushBrokers.new(detail_inner),
};
case 3:
let detail_inner = inner.trade!;
return PushEvent {
inner,
symbol: inner.symbol,
detail: PushTrades.new(detail_inner),
};
default:
let detail_inner = inner.candlestick!;
return PushEvent {
inner,
symbol: inner.symbol,
detail: PushCandlestick.new(detail_inner),
};
}
}